From: Michael M Slusarz Date: Fri, 19 Jun 2009 22:35:18 +0000 (-0600) Subject: Fix collapsing folders. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1568183f3eeb147c492556f97f2cd9f0d77682cf;p=horde.git Fix collapsing folders. --- diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index deebea09a..fc7918497 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -1922,13 +1922,12 @@ var DimpBase = { // don't need to parse through them. var subs = (mode == 'exp') ? base.ancestors().slice(0, -2).reverse().findAll(function(n) { return n.hasClassName('subfolders'); }) - : [ base ]; + : [ base.next('.subfolders') ]; - subs.each(function(s) { - if (s && - (mode == 'tog' || - (mode == 'exp' && !s.visible()) || - (mode == 'col' && s.visible()))) { + subs.compact().each(function(s) { + if (mode == 'tog' || + (mode == 'exp' && !s.visible()) || + (mode == 'col' && s.visible())) { s.previous().down().toggleClassName('exp').toggleClassName('col'); if (noeffect) {