diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-07 09:08:06 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-07 09:08:06 +0000 |
| commit | 9027fa87fbcf3393ab527fd3560a5ce04d491db6 (patch) | |
| tree | 29e001a4ccdd701ccf93854c9383c83dc23c54ba | |
| parent | 8fd0b52efb28b1e1754e8bf29baf0af31f77b69f (diff) | |
- fixed not working debug console (was initialized before html object creation)
- fixed separator in debug console
git-svn-id: https://svn.roundcube.net/trunk@1264 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/common.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/roundcubemail/program/js/common.js b/roundcubemail/program/js/common.js index 1701d3820..6e4c643fa 100644 --- a/roundcubemail/program/js/common.js +++ b/roundcubemail/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 = ''; }; } |
