Prevent that li.sepereator gets .selected

This commit is contained in:
0ip 2012-02-03 22:29:43 +01:00
parent 82b04df085
commit a8cc61545c
1 changed files with 5 additions and 2 deletions

View File

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