pad_editbar adapated hacky highlighting of currently opened module to recent changes

pull/641/head
0ip 2012-04-16 15:23:19 +02:00
parent 3e47300587
commit d75aeeaf8f
1 changed files with 6 additions and 6 deletions

View File

@ -182,7 +182,7 @@ var padeditbar = (function()
//hide all modules //hide all modules
if(moduleName == "none") if(moduleName == "none")
{ {
$("#editbar ul#menu_right > li").removeClass("selected"); $(".toolbar ul.menu_right li").removeClass("selected");
for(var i=0;i<modules.length;i++) for(var i=0;i<modules.length;i++)
{ {
//skip the userlist //skip the userlist
@ -200,11 +200,11 @@ var padeditbar = (function()
else else
{ {
var nth_child = indexOf(modules, moduleName) + 1; var nth_child = indexOf(modules, moduleName) + 1;
if (nth_child > 0 && nth_child <= (modules.length-1)) { if (nth_child > 0 && nth_child <= (modules.length-1)) {
$("#editbar ul#menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected"); $(".toolbar ul.menu_right li:not(:nth-child(" + nth_child + "))").removeClass("selected");
$("#editbar ul#menu_right li:nth-child(" + nth_child + ")").toggleClass("selected"); $(".toolbar ul.menu_right li:nth-child(" + nth_child + ")").toggleClass("selected");
} }
if(modules[modules.length-1] === moduleName) $("#editbar ul#menu_right li").removeClass("selected"); if(modules[modules.length-1] === moduleName) $(".toolbar ul.menu_right li").removeClass("selected");
//hide all modules that are not selected and show the selected one //hide all modules that are not selected and show the selected one
for(var i=0;i<modules.length;i++) for(var i=0;i<modules.length;i++)
{ {