Continue highlighting base menu entry when browsing submenu
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 4 Apr 2009 05:32:14 +0000 (23:32 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Apr 2009 16:54:54 +0000 (10:54 -0600)
imp/js/src/ContextSensitive.js
imp/themes/screen-dimp.css

index 900330a..bd4e130 100644 (file)
@@ -87,7 +87,9 @@ var ContextSensitive = Class.create({
                 }
             });
 
-            this.triggers.splice(idx, this.triggers.size() - idx);
+            this.triggers.splice(idx, this.triggers.size() - idx).each(function(s) {
+                $(s).removeClassName('contextHover');
+            });
 
             if (idx == 0) {
                 this.baseelt = null;
@@ -313,6 +315,7 @@ var ContextSensitive = Class.create({
                 y = offsets[1] + voffsets.top;
                 this._displayMenu($(sub), x, y, id);
                 this.triggers.push(id);
+                elt.addClassName('contextHover');
             }
         } else if ((this.current.size() > 1) &&
                    elt_up.hasClassName('contextMenu') &&
index 59af663..bc99126 100644 (file)
@@ -744,7 +744,7 @@ span.attachName:hover, .nojserror {
     text-decoration: none;
     color: #000;
 }
-.context a:hover {
+.context a:hover, .context a.contextSubmenu.contextHover {
     background: gray;
     color: #fff;
     cursor: pointer;