diff options
author | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-05-15 10:22:29 +0000 |
commit | 51ede06434097ef8d0697ee204fa998d6445d194 (patch) | |
tree | 76d6362bca66010776af8e8fbb971ba848cc3215 /program/js/common.js | |
parent | 9bee4437b889f4e36e37116ebf1fc24765eecad6 (diff) |
Apply changes from r2348 to r2400 for 0.2.2 release
Diffstat (limited to 'program/js/common.js')
-rw-r--r-- | program/js/common.js | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/program/js/common.js b/program/js/common.js index 5923989ec..c8670a277 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -602,41 +602,47 @@ function getCookie(name) roundcube_browser.prototype.get_cookie = getCookie; - // tiny replacement for Firebox functionality function rcube_console() { this.log = function(msg) { - box = rcube_find_object('console'); + var box = rcube_find_object('console'); - if (box) + if (box) { if (msg.charAt(msg.length-1)=='\n') - box.value += msg+'--------------------------------------\n'; + msg += '--------------------------------------\n'; else - box.value += msg+'\n--------------------------------------\n'; + msg += '\n--------------------------------------\n'; + + // Konqueror doesn't allows to just change value of hidden element + if (bw.konq) { + box.innerText += msg; + box.value = box.innerText; + } else + box.value += msg; + } }; this.reset = function() { - box = rcube_find_object('console'); + var box = rcube_find_object('console'); if (box) - box.value = ''; + box.innerText = box.value = ''; }; } var bw = new roundcube_browser(); - if (!window.console) - console = new rcube_console(); + var console = new rcube_console(); // Add escape() method to RegExp object // http://dev.rubyonrails.org/changeset/7271 RegExp.escape = function(str) - { +{ return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); - } +} // Make getElementById() case-sensitive on IE |