This is the code that implements popdowns.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 3 Feb 2009 04:26:03 +0000 (21:26 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 3 Feb 2009 06:55:56 +0000 (23:55 -0700)
imp/js/src/DimpBase.js

index bad9c8e..fd88367 100644 (file)
@@ -571,8 +571,16 @@ var DimpBase = {
         mf.addClassName('msgFilterDefault');
     },
 
-    _addMouseEvents: function(p)
+    _addMouseEvents: function(p, popdown)
     {
+        if (popdown) {
+            var bidelt = $(p.id);
+            bidelt.insert({ after: $($('popdown_img').cloneNode(false)).writeAttribute('id', p.id + '_img').show() });
+            p.id += '_img';
+            p.offset = bidelt.up();
+            p.left = true;
+        }
+
         p.onShow = this.bcache.get('onMS') || this.bcache.set('onMS', this._onMenuShow.bind(this));
         DimpCore.DMenu.addElement(p.id, 'ctx_' + p.type, p);
     },