diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index 8444c2c0d2..0d275e54bb 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -75,8 +75,8 @@ var Sunstone = { "updateMainTabButtons" : function(tab_id,buttons_arg,refresh){ SunstoneCfg["tabs"][tab_id]["buttons"]=buttons_arg; if (refresh){ - $('div#'+tab_name+' .action_blocks').empty(); - insertButtonsInTab(tab_name); + $('div#'+tab_id+' .action_blocks').empty(); + insertButtonsInTab(tab_id); } }, @@ -84,7 +84,8 @@ var Sunstone = { "removeMainTab" : function(tab_id,refresh) { delete SunstoneCfg["tabs"][tab_id]; if (refresh) { - $('div#'+tab_name).remove(); + $('div#'+tab_id).remove(); + $('ul#navigation li#li_'+tab_id).remove(); } }, @@ -382,7 +383,7 @@ function insertTab(tab_name){ $("div.inner-center").append('
'); $('div#'+tab_name).html(tab_info.content); - $('ul#navigation').append('
  • '+tab_info.title+'
  • '); + $('ul#navigation').append('
  • '+tab_info.title+'
  • '); } @@ -448,6 +449,7 @@ function insertButtonsInTab(tab_name){ $('div#'+tab_name+' .action_blocks').append(button_code); }//for each button in tab + $('.top_button').button(); }//if tab exists }