From: Jan Schneider Date: Wed, 18 Mar 2009 16:44:02 +0000 (+0100) Subject: No need for a separate init() method in Kronolith. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d914f84991252cbd22bdae1c92ced7e82fbfc0c2;p=horde.git No need for a separate init() method in Kronolith. --- diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index d862d6ef5..b5d978915 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -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