diff options
author | alecpl <alec@alec.pl> | 2008-04-07 09:08:06 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-04-07 09:08:06 +0000 |
commit | 7155539ffd146130ae05943c1ca9f50d36d644ee (patch) | |
tree | 6a174138a9089110e204388537bed1499274b9b3 /program/js | |
parent | 6051e6c1897c2c9ae7a9580779750fe923fe8add (diff) |
- fixed not working debug console (was initialized before html object creation)
- fixed separator in debug console
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/common.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/program/js/common.js b/program/js/common.js index 1701d3820..6e4c643fa 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -579,18 +579,21 @@ roundcube_browser.prototype.get_cookie = getCookie; // tiny replacement for Firebox functionality function rcube_console() { - this.box = rcube_find_object('console'); - this.log = function(msg) { - if (this.box) - this.box.value += str+'\n--------------------------------------\n'; + box = rcube_find_object('console'); + if (box) + if (msg[msg.length-1]=='\n') + box.value += msg+'--------------------------------------\n'; + else + box.value += msg+'\n--------------------------------------\n'; }; - + this.reset = function() { - if (this.box) - this.box.value = ''; + box = rcube_find_object('console'); + if (box) + box.value = ''; }; } |