From fe60cc221f922ea362826e2d00431c5df28fe85f Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 6 Oct 2006 03:46:05 +0000 Subject: fixed #410 #412 --- framework/Web/Javascripts/extra/logger.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'framework/Web/Javascripts/extra') diff --git a/framework/Web/Javascripts/extra/logger.js b/framework/Web/Javascripts/extra/logger.js index d1434361..5771f2f4 100644 --- a/framework/Web/Javascripts/extra/logger.js +++ b/framework/Web/Javascripts/extra/logger.js @@ -195,6 +195,8 @@ LogConsole.prototype = { commandHistory : [], commandIndex : 0, + hidden : true, + // Methods // ------- @@ -207,7 +209,7 @@ LogConsole.prototype = { document.body.appendChild(this.logElement) Element.hide(this.logElement) - this.logElement.style.position = "absolute" + this.logElement.style.position = "absolute" this.logElement.style.left = '0px' this.logElement.style.width = '100%' @@ -272,8 +274,15 @@ LogConsole.prototype = { Event.observe(this.inputElement, 'keyup', this.handleInput.bind(this)) Event.observe(this.inputElement, 'click', function() {this.inputElement.select()}.bind(this)) + if(document.all && !window.opera) + { window.setInterval(this.repositionWindow.bind(this), 500) - this.repositionWindow() + } + else + { + this.logElement.style.position="fixed"; + this.logElement.style.bottom="0px"; + } // Listen to the logger.... Logger.onupdate.addListener(this.logUpdate.bind(this)) @@ -310,11 +319,15 @@ LogConsole.prototype = { show : function() { Element.show(this.logElement) this.outputElement.scrollTop = this.outputElement.scrollHeight // Scroll to bottom when toggled + if(document.all && !window.opera) + this.repositionWindow(); Cookie.set('ConsoleVisible', 'true') this.inputElement.select() + this.hidden = false; }, hide : function() { + this.hidden = true; Element.hide(this.logElement) Cookie.set('ConsoleVisible', 'false') }, -- cgit v1.2.3