From af4717bc962ec4b93f765d239bb02b49b890f87b Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 4 Sep 2014 16:14:15 +0200 Subject: [PATCH] Define disk, nic and provider tab index --- .../public/js/plugins/templates-tab.js | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index ccbef38672..9b32bae7e0 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -292,7 +292,7 @@ var hybrid_inputs = { var create_template_wizard_html = '
'+ - '
'+ + '
'+ '
'+ wizard_tab_dd()+ '
'+ @@ -3109,6 +3109,10 @@ function setup_storage_tab_content(storage_section) { if (dd.attr("class") == 'active') { $('a', dl.children('dd').last()).click(); } + + $("dl#template_create_storage_tabs dd", storage_section).each(function(index){ + $("a", this).html(tr("Disk")+' '+index+" "); + }) }); $("#tf_btn_disks", storage_section).bind("click", function(){ @@ -3128,9 +3132,13 @@ function add_disk_tab(disk_id, dialog) { $(html_tab_content).appendTo($("#template_create_storage_tabs_content", dialog)); var a = $("
\ - "+tr("DISK")+" \ + "+tr("DISK")+"\
").appendTo($("dl#template_create_storage_tabs", dialog)); + $("dl#template_create_storage_tabs dd", dialog).each(function(index){ + $("a", this).html(tr("Disk")+' '+index+" "); + }) + $("a", a).trigger("click"); var disk_section = $('#' +str_disk_tab_id+'Tab', dialog); @@ -3158,6 +3166,10 @@ function setup_network_tab_content(network_section) { if (dd.attr("class") == 'active') { $('a', dl.children('dd').last()).click(); } + + $("dl#template_create_network_tabs dd", network_section).each(function(index){ + $("a", this).html(tr("Interface")+' '+index+" "); + }) }); $("#tf_btn_nics").bind("click", function(){ @@ -3175,10 +3187,14 @@ function add_nic_tab(nic_id, dialog) { '
' // Append the new div containing the tab and add the tab to the list - var a = $("
"+tr("NIC")+"
").appendTo($("dl#template_create_network_tabs", dialog)); + var a = $("
"+tr("NIC")+"
").appendTo($("dl#template_create_network_tabs", dialog)); $(html_tab_content).appendTo($("#template_create_network_tabs_content", dialog)); + $("dl#template_create_network_tabs dd", dialog).each(function(index){ + $("a", this).html(tr("Interface")+' '+index+" "); + }) + $("a", a).trigger("click"); var nic_section = $('#' + str_nic_tab_id + 'Tab', dialog); @@ -3799,6 +3815,10 @@ function setup_hybrid_tab_content(hybrid_section) { if (dd.attr("class") == 'active') { $('a', dl.children('dd').last()).click(); } + + $("dl#template_create_hybrid_tabs dd", hybrid_section).each(function(index){ + $("a", this).html(tr("Provider")+' '+index+" "); + }) }); $("#tf_btn_hybrid", hybrid_section).bind("click", function(){ @@ -3827,9 +3847,13 @@ function add_provider_tab(provider_id, dialog) { $(html_tab_content).appendTo($("#template_create_hybrid_tabs_content", dialog)); var a = $("
\ - "+tr("PROVIDER")+" \ + "+tr("PROVIDER")+"\
").appendTo($("dl#template_create_hybrid_tabs", dialog)); + $("dl#template_create_hybrid_tabs dd", dialog).each(function(index){ + $("a", this).html(tr("Provider")+' '+index+" "); + }) + $("a", a).trigger("click"); var provider_section = $('#' +str_provider_tab_id+'Tab', dialog);