From b58abd86c596522507442e399a70a7d30430b844 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 15 Apr 2014 18:38:39 +0200 Subject: [PATCH 1/3] email:main -> email:pref --- program/lib/Roundcube/rcube_csv2vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php index aa385dce4..06bc387d5 100644 --- a/program/lib/Roundcube/rcube_csv2vcard.php +++ b/program/lib/Roundcube/rcube_csv2vcard.php @@ -56,7 +56,7 @@ class rcube_csv2vcard //'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', From 2e79d8d539ebc1830553a49a8080d0356c9d9531 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 15 Apr 2014 19:11:00 +0200 Subject: [PATCH 2/3] Move more IE<9 specific code to legacy_browser --- plugins/legacy_browser/js/iehacks.js | 20 ++++++++++++++++++++ plugins/legacy_browser/legacy_browser.php | 19 +++++-------------- program/js/common.js | 14 -------------- 3 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 plugins/legacy_browser/js/iehacks.js diff --git a/plugins/legacy_browser/js/iehacks.js b/plugins/legacy_browser/js/iehacks.js new file mode 100644 index 000000000..129ad6003 --- /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 c910d76d4..bdf831e73 100644 --- a/plugins/legacy_browser/legacy_browser.php +++ b/plugins/legacy_browser/legacy_browser.php @@ -23,10 +23,12 @@ class legacy_browser extends rcube_plugin 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 . '"', + '||', + ''."\n" + .'', $args['content'], 1); return $args; @@ -53,17 +55,6 @@ class legacy_browser extends rcube_plugin '' ); } - - // fix missing :last-child selectors - $rcube->output->add_footer(implode("\n", array( - '' - ))); } } diff --git a/program/js/common.js b/program/js/common.js index ed9488b2c..3f82b6df8 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -596,20 +596,6 @@ if (!String.prototype.startsWith) { }; } -// 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 jQuery.fn.placeholder = function(text) { return this.each(function() { From 5be6dcf0e2234b22391ad4f654efddd0ba7c0e92 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 15 Apr 2014 19:19:56 +0200 Subject: [PATCH 3/3] Remove useless debug_level=8 and javascripts's rcube_console --- config/defaults.inc.php | 2 +- installer/config.php | 3 --- program/include/rcmail_output_html.php | 19 +++------------- program/js/common.js | 30 -------------------------- skins/classic/common.css | 5 ----- 5 files changed, 4 insertions(+), 55 deletions(-) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 5c5fccb1e..7f65b9748 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -56,7 +56,7 @@ $config['db_table_dsn'] = array( // 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 fd7932af4..8b98dbef6 100644 --- a/installer/config.php +++ b/installer/config.php @@ -198,9 +198,6 @@ echo '
'; echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4')); echo '
'; -echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8')); -echo '
'; - ?> diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index a23b8405e..c3232b246 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -519,25 +519,12 @@ class rcmail_output_html extends rcmail_output $output = preg_replace_callback('/]+)>/Ui', array($this, 'alter_form_tag'), $output); $this->footer = preg_replace_callback('/]+)>/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('' - ); - $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 3f82b6df8..3d264c3bd 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -529,36 +529,6 @@ function getCookie(name) 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(); diff --git a/skins/classic/common.css b/skins/classic/common.css index 30370205a..4367d26cb 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -941,11 +941,6 @@ a.rcmContactAddress:hover font-weight: bold; } -#console -{ - opacity: 0.8; -} - .disabled, a.disabled {