diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-26 10:54:18 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-07-26 10:54:18 +0000 |
| commit | b5fbd432d67a2184f75899f08197dceacc1aef26 (patch) | |
| tree | ef35025bc954043c24b6d6bc4db9abace4ab9eaa /roundcubemail/program/include/rcube_template.php | |
| parent | a3f4e43f6c042261551b7de9f916b8d4b034ad43 (diff) | |
- Move console object initialization code into one place
git-svn-id: https://svn.roundcube.net/trunk@4966 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_template.php')
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index a4c1a6915..a672c5058 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/program/include/rcube_template.php @@ -428,10 +428,15 @@ class rcube_template extends rcube_html_page if ($write) { // add debug console if ($this->config['debug_level'] & 8) { - $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;"> + $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;display:none"> <a href="#toggle" onclick="con=$(\'#dbgconsole\');con[con.is(\':visible\')?\'hide\':\'show\']();return false">console</a> <textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:10px" spellcheck="false"></textarea></div>' ); + $this->add_script( + "if (!window.console || !window.console.log) {\n". + " window.console = new rcube_console();\n". + " $('#console').show();\n". + "}", 'foot'); } $this->write(trim($output)); } |
