From e5a77d2634cd165da7bc6f86bb08fe21d9e357ea Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 16 Apr 2014 04:50:43 -0400 Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail --- program/include/rcmail_output_html.php | 19 +-------- program/js/common.js | 44 ---------------------- installer/config.php | 3 - plugins/legacy_browser/js/iehacks.js | 20 ++++++++++ plugins/legacy_browser/legacy_browser.php | 19 ++------- skins/classic/common.css | 5 -- program/lib/Roundcube/rcube_csv2vcard.php | 2 config/defaults.inc.php | 2 8 files changed, 30 insertions(+), 84 deletions(-) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 5c5fccb..7f65b97 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -56,7 +56,7 @@ // LOGGING/DEBUGGING // ---------------------------------- -// system error reporting, sum of: 1 = log; 4 = show, 8 = trace +// system error reporting, sum of: 1 = log; 4 = show $config['debug_level'] = 1; // log driver: 'syslog' or 'file'. diff --git a/installer/config.php b/installer/config.php index fd7932a..8b98dbe 100644 --- a/installer/config.php +++ b/installer/config.php @@ -198,9 +198,6 @@ echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4')); echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />'; -echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8')); -echo '<label for="cfgdebug8">Verbose display (enables debug console)</label><br />'; - ?> </dd> diff --git a/plugins/legacy_browser/js/iehacks.js b/plugins/legacy_browser/js/iehacks.js new file mode 100644 index 0000000..129ad60 --- /dev/null +++ b/plugins/legacy_browser/js/iehacks.js @@ -0,0 +1,20 @@ + +// Make getElementById() case-sensitive on IE7 +document._getElementById = document.getElementById; +document.getElementById = function(id) { + var i = 0, obj = document._getElementById(id); + + if (obj && obj.id != id) + while ((obj = document.all[i]) && obj.id != id) + i++; + + return obj; +} + +// fix missing :last-child selectors +$(document).ready(function() { + if (rcmail && rcmail.env.skin != 'classic') + $('ul.treelist ul').each(function(i, ul) { + $('li:last-child', ul).css('border-bottom', 0); + }); +}); diff --git a/plugins/legacy_browser/legacy_browser.php b/plugins/legacy_browser/legacy_browser.php index c910d76..bdf831e 100644 --- a/plugins/legacy_browser/legacy_browser.php +++ b/plugins/legacy_browser/legacy_browser.php @@ -23,10 +23,12 @@ function send_page($args) { // replace jQuery 2.x with 1.x - $ts = filemtime($this->home . '/js/jquery.min.js'); + $ts1 = filemtime($this->home . '/js/jquery.min.js'); + $ts2 = filemtime($this->home . '/js/iehacks.js'); $args['content'] = preg_replace( - '|"program/js/jquery\.min\.js\?s=[0-9]+"|', - '"plugins/legacy_browser/js/jquery.min.js?s=' . $ts . '"', + '|<script src="program/js/jquery\.min\.js\?s=[0-9]+" type="text/javascript"></script>|', + '<script src="plugins/legacy_browser/js/jquery.min.js?s=' . $ts1 . '" type="text/javascript"></script>'."\n" + .'<script src="plugins/legacy_browser/js/iehacks.js?s=' . $ts2 . '" type="text/javascript"></script>', $args['content'], 1); return $args; @@ -53,17 +55,6 @@ '<link rel="stylesheet" type="text/css" href="plugins/legacy_browser/larry/iehacks.css" />' ); } - - // fix missing :last-child selectors - $rcube->output->add_footer(implode("\n", array( - '<script type="text/javascript">', - '$(document).ready(function() {', - ' $(\'ul.treelist ul\').each(function(i,ul) {', - ' $(\'li:last-child\', ul).css(\'border-bottom\', 0);', - ' });', - '});', - '</script>' - ))); } } diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index a23b840..c3232b2 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -519,25 +519,12 @@ $output = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $output); $this->footer = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $this->footer); - if ($write) { - // add debug console - if ($realname != 'error' && ($this->config->get('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;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" 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)); - } - else { + if (!$write) { return $output; } + $this->write(trim($output)); + if ($exit) { exit; } diff --git a/program/js/common.js b/program/js/common.js index 7bb76c7..2b20ff5 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -533,36 +533,6 @@ roundcube_browser.prototype.set_cookie = setCookie; roundcube_browser.prototype.get_cookie = getCookie; -// tiny replacement for Firebox functionality -function rcube_console() -{ - this.log = function(msg) - { - var box = rcube_find_object('dbgconsole'); - - if (box) { - if (msg.charAt(msg.length-1)=='\n') - msg += '--------------------------------------\n'; - else - msg += '\n--------------------------------------\n'; - - // Konqueror doesn't allow to just change the value of hidden element - if (bw.konq) { - box.innerText += msg; - box.value = box.innerText; - } else - box.value += msg; - } - }; - - this.reset = function() - { - var box = rcube_find_object('dbgconsole'); - if (box) - box.innerText = box.value = ''; - }; -}; - var bw = new roundcube_browser(); bw.set_html_class(); @@ -598,20 +568,6 @@ position = position || 0; return this.slice(position, search.length) === search; }; -} - -// Make getElementById() case-sensitive on IE -if (bw.ie) { - document._getElementById = document.getElementById; - document.getElementById = function(id) { - var i = 0, obj = document._getElementById(id); - - if (obj && obj.id != id) - while ((obj = document.all[i]) && obj.id != id) - i++; - - return obj; - } } // jQuery plugin to emulate HTML5 placeholder attributes on input elements diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php index aa385dc..06bc387 100644 --- a/program/lib/Roundcube/rcube_csv2vcard.php +++ b/program/lib/Roundcube/rcube_csv2vcard.php @@ -56,7 +56,7 @@ //'email_2_type' => '', //'email_3_address' => '', //@TODO //'email_3_type' => '', - 'email_address' => 'email:main', + 'email_address' => 'email:pref', //'email_type' => '', 'first_name' => 'firstname', 'gender' => 'gender', diff --git a/skins/classic/common.css b/skins/classic/common.css index 3037020..4367d26 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -941,11 +941,6 @@ font-weight: bold; } -#console -{ - opacity: 0.8; -} - .disabled, a.disabled { -- Gitblit v1.9.1