mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Feature #3963: input values also change the name selector
This commit is contained in:
1 parent
2e4cefcacb
commit
cfa111f5b2
1 file changed
+14
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user