mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Feature #3963: input values also change the name selector
This commit is contained in:
parent
2e4cefcacb
commit
cfa111f5b2
@ -97,6 +97,8 @@ define(function(require) {
|
||||
html += '</select>';
|
||||
|
||||
$(".device_name", tr).html(html);
|
||||
|
||||
$("input", tr).trigger("change");
|
||||
},
|
||||
error: function(request, error_json){
|
||||
console.error("There was an error requesting the PCI devices: "+
|
||||
@ -117,6 +119,18 @@ define(function(require) {
|
||||
$('input[wizard_field="VENDOR"]', tr).val( option.attr("vendor") );
|
||||
});
|
||||
|
||||
context.on("change", ".pci_devices tbody input", function(){
|
||||
var tr = $(this).closest('tr');
|
||||
|
||||
var opt =
|
||||
$('option'+
|
||||
'[device="'+$('input[wizard_field="DEVICE"]', tr).val()+'"]'+
|
||||
'[class="'+$('input[wizard_field="CLASS"]', tr).val()+'"]'+
|
||||
'[vendor="'+$('input[wizard_field="VENDOR"]', tr).val()+'"]', tr);
|
||||
|
||||
opt.attr('selected', 'selected');
|
||||
});
|
||||
|
||||
context.on("click", ".pci_devices i.remove-tab", function(){
|
||||
var tr = $(this).closest('tr');
|
||||
tr.remove();
|
||||
|
Loading…
x
Reference in New Issue
Block a user