Admin theme: fixed onload behavior of collapsible menu
authorDan
Wed, 08 Jul 2009 23:39:31 -0400
changeset 1049 9bf901e1de42
parent 1048 7b9132bfb5ce
child 1050 94d835500d5b
Admin theme: fixed onload behavior of collapsible menu
themes/admin/footer.tpl
themes/admin/js/menu.js
--- a/themes/admin/footer.tpl	Wed Jul 08 23:37:01 2009 -0400
+++ b/themes/admin/footer.tpl	Wed Jul 08 23:39:31 2009 -0400
@@ -38,7 +38,7 @@
     </tr>
     </table>
     
+    <script type="text/javascript" src="{CDNPATH}/themes/admin/js/menu.js"></script>
     {JS_FOOTER}
-    <script type="text/javascript" src="{CDNPATH}/themes/admin/js/menu.js"></script>
   </body>
 </html>
--- a/themes/admin/js/menu.js	Wed Jul 08 23:37:01 2009 -0400
+++ b/themes/admin/js/menu.js	Wed Jul 08 23:39:31 2009 -0400
@@ -2,8 +2,6 @@
  * IE doesn't like display: table.
  */
 
-var TBL_SHOW = ( IE ) ? 'block' : 'table';
-
 function admin_expand()
 {
   var expander = document.getElementById('sidebar-hide');
@@ -84,6 +82,10 @@
   expander.style.height = barheight + 'px';
 }
 
+addOnloadHook(function()
+  {
+    window.TBL_SHOW = ( IE ) ? 'block' : 'table';
+  });
 addOnloadHook(expander_set_height);
 addOnloadHook(expander_onload);
 window.onresize = expander_set_height;