diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other.js index 0fe2c15e56..5f65700ab3 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other.js @@ -97,6 +97,8 @@ define(function(require) { html += ''; $(".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();