includes/clientside/static/enano-lib-basic.js
changeset 588 20484deb89cd
parent 586 234ddd896555
child 589 88d4ed0a2898
--- a/includes/clientside/static/enano-lib-basic.js	Thu Jun 26 18:05:42 2008 -0400
+++ b/includes/clientside/static/enano-lib-basic.js	Thu Jun 26 20:55:13 2008 -0400
@@ -20,6 +20,20 @@
   alert('There was a problem loading the PHP-generated Javascript variables that control parameters for AJAX applets. Most on-page functionality will be very badly broken.\n\nTheme developers, ensure that you are using {JS_DYNAMIC_VARS} *before* you include jsres.php.');
 }
 
+// placeholder for window.console - used if firebug isn't present
+// http://getfirebug.com/firebug/firebugx.js
+if (!window.console || !console.firebug)
+{
+    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+    "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
+
+    window.console = {};
+    for (var i = 0; i < names.length; ++i)
+        window.console[names[i]] = function() {}
+}
+
+console.info('Enano::JS runtime: starting system init');
+
 if ( typeof(ENANO_JSRES_COMPRESSED) == undefined )
 {
   var ENANO_JSRES_COMPRESSED = false;
@@ -68,8 +82,7 @@
   }
 }
 
-// dummy tinyMCE object
-var tinyMCE = new Object();
+var tinymce_initted = false;
 
 if ( typeof(DISABLE_MCE) == undefined )
 {
@@ -263,6 +276,8 @@
 function load_hide_win()
 {
   var ld = document.getElementById('_js_load_component');
+  if ( !ld )
+    return false;
   ld.parentNode.removeChild(ld);
 }
 
@@ -330,18 +345,6 @@
 
 var head = document.getElementsByTagName('head')[0];
 
-// placeholder for window.console - used if firebug isn't present
-// http://getfirebug.com/firebug/firebugx.js
-if (!window.console || !console.firebug)
-{
-    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
-    "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
-    window.console = {};
-    for (var i = 0; i < names.length; ++i)
-        window.console[names[i]] = function() {}
-}
-
 // safari has window.console but not the .debug() method
 if ( is_Safari && !window.console.debug )
 {
@@ -359,6 +362,7 @@
   'dropdown.js',
   'json.js',
   'sliders.js',
+  'tinymce-init.js',
   'loader.js'
 ];