Author: jablko
Date: Wed Aug 12 12:30:19 2009
New Revision: 3020

Log:
Make actions menu simpler and themable by using CSS instead of JavaScript -- 
force

Modified:
   trunk/web/css/menu.css
   trunk/web/js/actions.js

Modified: trunk/web/css/menu.css
==============================================================================
--- trunk/web/css/menu.css      Wed Aug 12 11:33:21 2009        (r3019)
+++ trunk/web/css/menu.css      Wed Aug 12 12:30:19 2009        (r3020)
@@ -764,3 +764,13 @@
 {
   border-bottom: 3em solid #fff;
 }
+
+.list img
+{
+  visibility: hidden;
+}
+
+.list :hover > img
+{
+  visibility: visible;
+}

Modified: trunk/web/js/actions.js
==============================================================================
--- trunk/web/js/actions.js     Wed Aug 12 11:33:21 2009        (r3019)
+++ trunk/web/js/actions.js     Wed Aug 12 12:30:19 2009        (r3020)
@@ -5,7 +5,7 @@
     {
       $('.actions').each(function ()
         {
-          var img = $(<img src={Qubit.relativeUrlRoot + 
'/sfDrupalPlugin/vendor/drupal/misc/menu-expanded.png'}/>.toXMLString()).css('visibility',
 'hidden').replaceAll(this).get(0);
+          var img = $(<img src={Qubit.relativeUrlRoot + 
'/sfDrupalPlugin/vendor/drupal/misc/menu-expanded.png'}/>.toXMLString()).replaceAll(this).get(0);
 
           // HACK: YAHOO.widget.Menu() requires a string argument
           var menu = new YAHOO.widget.Menu(Math.random().toString(), { 
context: [img, 'tl', 'bl' ] });
@@ -21,13 +21,5 @@
             {
               menu.show();
             });
-
-          $(img.parentNode).hover(function ()
-            {
-              $(img).css('visibility', 'visible');
-            }, function ()
-            {
-              $(img).css('visibility', 'hidden');
-            });
         });
     } };

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to