From d75aeeaf8f6d66a8d539956e0ecfe52fc36cb205 Mon Sep 17 00:00:00 2001 From: 0ip Date: Mon, 16 Apr 2012 15:23:19 +0200 Subject: [PATCH] pad_editbar adapated hacky highlighting of currently opened module to recent changes --- src/static/js/pad_editbar.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index 95d195058..dec32b466 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -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 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"); - } - if(modules[modules.length-1] === moduleName) $("#editbar ul#menu_right li").removeClass("selected"); + if (nth_child > 0 && nth_child <= (modules.length-1)) { + $(".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) $(".toolbar ul.menu_right li").removeClass("selected"); //hide all modules that are not selected and show the selected one for(var i=0;i