[Jifty-commit] r938 - in jifty/branches/jifty-jsan: share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Apr 26 21:01:54 EDT 2006


Author: trs
Date: Wed Apr 26 21:01:54 2006
New Revision: 938

Modified:
   jifty/branches/jifty-jsan/   (props changed)
   jifty/branches/jifty-jsan/share/web/static/js/key_bindings.js

Log:
 r10127 at zot:  tom | 2006-04-26 21:01:10 -0400
 Only append the keybindings if there are any


Modified: jifty/branches/jifty-jsan/share/web/static/js/key_bindings.js
==============================================================================
--- jifty/branches/jifty-jsan/share/web/static/js/key_bindings.js	(original)
+++ jifty/branches/jifty-jsan/share/web/static/js/key_bindings.js	Wed Apr 26 21:01:54 2006
@@ -98,11 +98,13 @@
             }
         }
         
-        e.appendChild( dl );
-        Element.addClassName(e, 'keybindings-written');
+        if ( dl.hasChildNodes() ) {
+            e.appendChild( dl );
+            Element.addClassName(e, 'keybindings-written');
         
-        /* since we wrote the legend, now obey it */
-        Jifty.KeyBindings.activate();
+            /* since we wrote the legend, now obey it */
+            Jifty.KeyBindings.activate();
+        }
     }
 }
 


More information about the Jifty-commit mailing list