No need for a separate init() method in Kronolith.
authorJan Schneider <jan@horde.org>
Wed, 18 Mar 2009 16:44:02 +0000 (17:44 +0100)
committerJan Schneider <jan@horde.org>
Wed, 18 Mar 2009 23:40:48 +0000 (00:40 +0100)
kronolith/js/src/kronolith.js

index d862d6e..b5d9789 100644 (file)
@@ -910,7 +910,9 @@ KronolithCore = {
     /* Onload function. */
     onDomLoad: function()
     {
-        this.init();
+        if (typeof ContextSensitive != 'undefined') {
+            this.DMenu = new ContextSensitive({ onClick: this.contextOnClick, onShow: this.contextOnShow });
+        }
 
         document.observe('keydown', KronolithCore.keydownHandler.bindAsEventListener(KronolithCore));
         document.observe('keyup', KronolithCore.keyupHandler.bindAsEventListener(KronolithCore));
@@ -1016,25 +1018,6 @@ KronolithCore = {
     // By default, no context onClick action
     contextOnClick: Prototype.emptyFunction,
 
-    /* Kronolith initialization function. */
-    init: function()
-    {
-        if (typeof ContextSensitive != 'undefined') {
-            this.DMenu = new ContextSensitive({ onClick: this.contextOnClick, onShow: this.contextOnShow });
-        }
-
-        /* Don't do additional onload stuff if we are in a popup. We need a
-         * try/catch block here since, if the page was loaded by an opener
-         * out of this current domain, this will throw an exception. */
-        try {
-            if (parent.opener &&
-                parent.opener.location.host == window.location.host &&
-                parent.opener.DimpCore) {
-                Kronolith.baseWindow = parent.opener.Kronolith.baseWindow || parent.opener;
-            }
-        } catch (e) {}
-    }
-
 };
 
 /* Helper methods for setting/getting element text without mucking