plugins/SpecialAdmin.php
changeset 346 35b0a72083ca
parent 324 6f030150b171
--- a/plugins/SpecialAdmin.php	Tue Jul 12 22:49:29 2011 -0400
+++ b/plugins/SpecialAdmin.php	Wed Mar 13 00:18:23 2013 -0400
@@ -2402,21 +2402,16 @@
       'icon_26' : '<?php echo scriptPath; ?>/images/icons/minusbottom.gif',// junction for opened node
       'icon_27' : '<?php echo scriptPath; ?>/images/icons/minus.gif'       // junction for last opended node
     };
-    addOnloadHook(keepalive_onload);
+    if ( typeof(keepalive_onload) == 'function' )
+	addOnloadHook(keepalive_onload);
     <?php
     echo $paths->parseAdminTree(); // Make a Javascript array that defines the tree
-    if(!isset($_GET['module'])) { echo 'addOnloadHook(_enanoAdminOnload);'; } ?>
+    if(!isset($_GET['module'])) { echo 'addOnloadHook(function() { _enanoAdminOnload(); new tree(TREE_ITEMS, TREE_TPL, \'admin_tree\'); } )'; } ?>
     </script>
     <table border="0" width="100%">
       <tr>
         <td class="holder" valign="top">
-          <div class="pad" style="padding-right: 20px;">
-            <script type="text/javascript">
-            if ( !KILL_SWITCH )
-            {
-              new tree(TREE_ITEMS, TREE_TPL);
-            }
-            </script>
+          <div class="pad" style="padding-right: 20px;" id="admin_tree">
           </div>
         </td>
         <td width="100%" valign="top">
@@ -3010,4 +3005,4 @@
   $template->footer();
 }
 
-?>
\ No newline at end of file
+?>