pad_editbar adapated hacky highlighting of currently opened module to recent changes
parent
3e47300587
commit
d75aeeaf8f
|
@ -182,7 +182,7 @@ var padeditbar = (function()
|
|||
//hide all modules
|
||||
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++)
|
||||
{
|
||||
//skip the userlist
|
||||
|
@ -201,10 +201,10 @@ var padeditbar = (function()
|
|||
{
|
||||
var nth_child = indexOf(modules, moduleName) + 1;
|
||||
if (nth_child > 0 && nth_child <= (modules.length-1)) {
|
||||
$("#editbar 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:not(:nth-child(" + nth_child + "))").removeClass("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
|
||||
for(var i=0;i<modules.length;i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue