diff options
author | 0ip <me@factor.cc> | 2012-04-06 22:32:19 +0300 |
---|---|---|
committer | 0ip <me@factor.cc> | 2012-04-06 22:32:19 +0300 |
commit | ae21eb30ddda46f535d5024bd192145383d4be5d (patch) | |
tree | 3fe2a65bb450c3c87168020e8106085b1b70b2f8 /src/static/js/pad_editbar.js | |
parent | 7766f8aaadc4b4950d9bb80bd2b91e79c9dd601b (diff) | |
download | etherpad-lite-ae21eb30ddda46f535d5024bd192145383d4be5d.zip |
Deselect highlighted editbar module button when userlist is opened
Diffstat (limited to 'src/static/js/pad_editbar.js')
-rw-r--r-- | src/static/js/pad_editbar.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index 7e8cf96e..95d19505 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -200,10 +200,11 @@ var padeditbar = (function() else { var nth_child = indexOf(modules, moduleName) + 1; - if (nth_child > 0 && nth_child <= 3) { + 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"); } + if(modules[modules.length-1] === moduleName) $("#editbar 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++) { |