From d914f84991252cbd22bdae1c92ced7e82fbfc0c2 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 18 Mar 2009 17:44:02 +0100 Subject: [PATCH] No need for a separate init() method in Kronolith. --- kronolith/js/src/kronolith.js | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) 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 -- 2.11.0