diff options
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | plugins/managesieve/managesieve.php | 8 | ||||
-rw-r--r-- | program/include/rcmail_output_html.php | 2 | ||||
-rw-r--r-- | program/js/app.js | 15 | ||||
-rw-r--r-- | program/js/editor.js | 31 | ||||
-rw-r--r-- | program/js/googiespell.js | 12 | ||||
-rw-r--r-- | program/js/tinymce/roundcube/content.css | 4 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 12 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_plugin.php | 9 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 17 | ||||
-rw-r--r-- | program/steps/settings/save_folder.inc | 4 | ||||
-rw-r--r-- | skins/classic/functions.js | 7 | ||||
-rw-r--r-- | skins/classic/googiespell.css | 2 | ||||
-rw-r--r-- | skins/larry/googiespell.css | 7 | ||||
-rw-r--r-- | skins/larry/mail.css | 6 | ||||
-rw-r--r-- | skins/larry/ui.js | 2 |
16 files changed, 84 insertions, 57 deletions
@@ -59,6 +59,9 @@ CHANGELOG Roundcube Webmail - Fix handling of uuencoded messages if messages_cache is enabled (#1490108) - Fix handling of base64-encoded attachments with extra spaces (#1490111) - Fix handling of UNKNOWN-CTE response, try do decode content client-side (#1490046) +- Fix bug where creating subfolders in shared folders wasn't possible without ACL extension (#1490113) +- Fix reply scrolling issue with text mode and start message below the quote (#1490114) +- Fix possible issues in skin/skin_path config handling (#1490125) RELEASE 1.0.3 ------------- diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index 7a307e1fe..f41394e31 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -85,14 +85,10 @@ class managesieve extends rcube_plugin // include styles $skin_path = $this->local_skin_path(); if ($this->rc->task == 'settings' || $sieve_action) { - if (is_file($this->home . "/$skin_path/managesieve.css")) { - $this->include_stylesheet("$skin_path/managesieve.css"); - } + $this->include_stylesheet("$skin_path/managesieve.css"); } else { - if (is_file($this->home . "/$skin_path/managesieve_mail.css")) { - $this->include_stylesheet("$skin_path/managesieve_mail.css"); - } + $this->include_stylesheet("$skin_path/managesieve_mail.css"); } $this->ui_initialized = true; diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 0f2a0a6d5..3d2f51ba1 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -187,6 +187,8 @@ EOF; $valid = !$skin; } + $skin_path = rtrim($skin_path, '/'); + $this->config->set('skin_path', $skin_path); $this->base_path = $skin_path; diff --git a/program/js/app.js b/program/js/app.js index 5d799c278..31544abf0 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3319,7 +3319,7 @@ function rcube_webmail() if (!this.gui_objects.messageform) return false; - var i, input_from = $("[name='_from']"), + var i, pos, input_from = $("[name='_from']"), input_to = $("[name='_to']"), input_subject = $("input[name='_subject']"), input_message = $("[name='_message']").get(0), @@ -3353,12 +3353,19 @@ function rcube_webmail() } if (!html_mode) { - this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length); + pos = this.env.top_posting ? 0 : input_message.value.length; + this.set_caret_pos(input_message, pos); + // add signature according to selected identity // if we have HTML editor, signature is added in callback if (input_from.prop('type') == 'select-one') { this.change_identity(input_from[0]); } + + // scroll to the bottom of the textarea (#1490114) + if (pos) { + $(input_message).scrollTop(input_message.scrollHeight); + } } // check for locally stored compose data @@ -3652,7 +3659,7 @@ function rcube_webmail() this.save_response = function() { // show dialog to enter a name and to modify the text to be saved - var buttons = {}, text = this.editor.get_content(true, true), + var buttons = {}, text = this.editor.get_content({selection: true, format: 'text', nosig: true}), html = '<form class="propform">' + '<div class="prop block"><label>' + this.get_label('responsename') + '</label>' + '<input type="text" name="name" id="ffresponsename" size="40" /></div>' + @@ -3840,7 +3847,7 @@ function rcube_webmail() if (val = $('[name="_' + hash_fields[i] + '"]').val()) str += val + ':'; - str += this.editor.get_content(); + str += this.editor.get_content({refresh: false}); if (this.env.attachments) for (id in this.env.attachments) diff --git a/program/js/editor.js b/program/js/editor.js index 0facfd948..3c10ad881 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -40,7 +40,7 @@ function rcube_text_editor(config, id) selector: '#' + ($('#' + id).is('.mce_editor') ? id : 'fake-editor-id'), theme: 'modern', language: config.lang, - content_css: 'program/js/tinymce/roundcube/content.css?v1', + content_css: 'program/js/tinymce/roundcube/content.css?v2', menubar: false, statusbar: false, toolbar_items_size: 'small', @@ -391,29 +391,33 @@ function rcube_text_editor(config, id) }; // get selected text (if no selection returns all text) from the editor - this.get_content = function(selected, plain) + this.get_content = function(args) { - // apply spellcheck changes if spell checker is active - this.spellcheck_stop(); + var sigstart, ed = this.editor, text = '', strip = false, + defaults = {refresh: true, selection: false, nosig: false, format: 'html'}; + + args = $.extend(defaults, args); - var sigstart, ed = this.editor, - format = plain ? 'text' : 'html', - text = '', strip = false; + // apply spellcheck changes if spell checker is active + if (args.refresh) { + this.spellcheck_stop(); + } // get selected text from tinymce editor if (ed) { ed.getWin().focus(); // correct focus in IE & Chrome - if (selected) - text = ed.selection.getContent({format: format}); + if (args.selection) + text = ed.selection.getContent({format: args.format}); if (!text) { - text = ed.getContent({format: format}); - strip = true; + text = ed.getContent({format: args.format}); + // @todo: strip signature in html mode + strip = args.format == 'text'; } } // get selected text from compose textarea else if (ed = rcube_find_object(this.id)) { - if (selected && $(ed).is(':focus')) { + if (args.selection && $(ed).is(':focus')) { text = rcmail.get_input_selection(ed).text; } @@ -424,7 +428,8 @@ function rcube_text_editor(config, id) } // strip off signature - if (strip) { + // @todo: make this optional + if (strip && args.nosig) { sigstart = text.indexOf('-- \n'); if (sigstart > 0) { text = text.substring(0, sigstart); diff --git a/program/js/googiespell.js b/program/js/googiespell.js index 707efd165..8c17508dd 100644 --- a/program/js/googiespell.js +++ b/program/js/googiespell.js @@ -312,7 +312,9 @@ this.prepare = function(ignore, no_indicator) this.ignore = ignore; this.hideLangWindow(); - if ($(this.text_area).val() == '' || ignore) { + var area = $(this.text_area); + + if (area.val() == '' || ignore) { if (!this.custom_no_spelling_error) this.flashNoSpellingErrorState(); else @@ -321,7 +323,7 @@ this.prepare = function(ignore, no_indicator) return; } - this.createEditLayer(this.text_area.offsetWidth, this.text_area.offsetHeight); + this.createEditLayer(area.width(), area.height()); this.createErrorWindow(); $('body').append(this.error_window); @@ -331,7 +333,7 @@ this.prepare = function(ignore, no_indicator) if (this.main_controller) $(this.spell_span).unbind('click'); - this.orginal_text = $(this.text_area).val(); + this.orginal_text = area.val(); }; this.parseResult = function(r_text) @@ -674,10 +676,10 @@ this.createEditLayer = function(width, height) { this.edit_layer = document.createElement('div'); $(this.edit_layer).addClass('googie_edit_layer').attr('id', 'googie_edit_layer') - .width('auto').height(height); + .width(width).height(height); if (this.text_area.nodeName.toLowerCase() != 'input' || $(this.text_area).val() == '') { - $(this.edit_layer).css('overflow', 'auto').height(height-4); + $(this.edit_layer).css('overflow', 'auto'); } else { $(this.edit_layer).css('overflow', 'hidden'); } diff --git a/program/js/tinymce/roundcube/content.css b/program/js/tinymce/roundcube/content.css index 67480ab77..0ad246ea0 100644 --- a/program/js/tinymce/roundcube/content.css +++ b/program/js/tinymce/roundcube/content.css @@ -7,9 +7,7 @@ body, td, pre { body { background-color: #FFFFFF; - margin-left: 4px; - margin-right: 4px; - margin-top: 2px; + margin: 4px; } div.pre { diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 0d33ba411..3644d6b8e 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -222,6 +222,7 @@ class rcube_message // part body not fetched yet... save in memory if it's small enough if ($part->body === null && is_numeric($mime_id) && $part->size < self::BODY_MAX_SIZE) { + $this->storage->set_folder($this->folder); // Warning: body here should be always unformatted $part->body = $this->storage->get_message_part($this->uid, $mime_id, $part, null, null, true, 0, false); @@ -263,17 +264,18 @@ class rcube_message $this->storage->set_folder($this->folder); $body = $this->storage->get_message_part($this->uid, $mime_id, $part, - $mode === -1, is_resource($mode) ? $mode : null, !$formatted, $max_bytes, $formatted); - - if (!$mode && $body && $formatted) { - $body = self::format_part_body($body, $part, $this->headers->charset); - } + $mode === -1, is_resource($mode) ? $mode : null, + !($mode && $formatted), $max_bytes, $mode && $formatted); if (is_resource($mode)) { rewind($mode); return $body !== false; } + if (!$mode && $body && $formatted) { + $body = self::format_part_body($body, $part, $this->headers->charset); + } + return $body; } diff --git a/program/lib/Roundcube/rcube_plugin.php b/program/lib/Roundcube/rcube_plugin.php index 9c7a9c2dc..e240448a2 100644 --- a/program/lib/Roundcube/rcube_plugin.php +++ b/program/lib/Roundcube/rcube_plugin.php @@ -71,6 +71,7 @@ abstract class rcube_plugin protected $home; protected $urlbase; private $mytask; + private $loaded_config = array(); /** @@ -141,6 +142,12 @@ abstract class rcube_plugin */ public function load_config($fname = 'config.inc.php') { + if (in_array($fname, $this->loaded_config)) { + return true; + } + + $this->loaded_config[] = $fname; + $fpath = $this->home.'/'.$fname; $rcube = rcube::get_instance(); @@ -415,7 +422,7 @@ abstract class rcube_plugin $rcube = rcube::get_instance(); $skins = array_keys((array)$rcube->output->skins); if (empty($skins)) { - $skins = array($rcube->config->get('skin')); + $skins = (array) $rcube->config->get('skin'); } foreach ($skins as $skin) { $skin_path = 'skins/' . $skin; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 9b6d0dcc9..751729cc5 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -986,6 +986,8 @@ function rcmail_create_reply_body($body, $bodyIsHtml) ) )); + $reply_mode = intval($RCMAIL->config->get('reply_mode')); + if (!$bodyIsHtml) { $body = preg_replace('/\r?\n/', "\n", $body); $body = trim($body, "\n"); @@ -994,10 +996,13 @@ function rcmail_create_reply_body($body, $bodyIsHtml) $body = rcmail_wrap_and_quote($body, $LINE_LENGTH); $prefix .= "\n"; - $suffix = ''; - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + if ($reply_mode > 0) { // top-posting $prefix = "\n\n\n" . $prefix; + $suffix = ''; + } + else { + $suffix = "\n"; } } else { @@ -1012,7 +1017,7 @@ function rcmail_create_reply_body($body, $bodyIsHtml) $prefix = '<p>' . rcube::Q($prefix) . "</p>\n"; $prefix .= '<blockquote>'; - if (intval($RCMAIL->config->get('reply_mode')) > 0) { // top-posting + if ($reply_mode > 0) { // top-posting $prefix = '<br>' . $prefix; $suffix = '</blockquote>'; } @@ -1447,6 +1452,9 @@ function rcmail_compose_subject($attrib) if (isset($_POST['_subject'])) { $subject = rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, TRUE); } + else if (!empty($COMPOSE['param']['subject'])) { + $subject = $COMPOSE['param']['subject']; + } // create a reply-subject else if ($compose_mode == RCUBE_COMPOSE_REPLY) { if (preg_match('/^re:/i', $MESSAGE->subject)) @@ -1468,9 +1476,6 @@ function rcmail_compose_subject($attrib) else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { $subject = $MESSAGE->subject; } - else if (!empty($COMPOSE['param']['subject'])) { - $subject = $COMPOSE['param']['subject']; - } $out = $form_start ? "$form_start\n" : ''; $out .= $textfield->show($subject); diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc index b8fc49060..30003aa05 100644 --- a/program/steps/settings/save_folder.inc +++ b/program/steps/settings/save_folder.inc @@ -68,7 +68,9 @@ else { } // Check access rights to the parent folder -if (!$error && strlen($path) && (!strlen($old_imap) || $old_imap != $name_imap)) { +if (!$error && strlen($path) && (!strlen($old_imap) || $old_imap != $name_imap) + && $STORAGE->get_capability('ACL') +) { $parent_opts = $STORAGE->folder_info($path); if ($parent_opts['namespace'] != 'personal' && (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts['rights']))) diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 2bf1538c4..aaa4f7288 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -547,12 +547,13 @@ init_compose_form: function() resize_compose_body: function() { var div = $('#compose-div .boxlistcontent'), - w = div.width() - 2, h = div.height(), + w = div.width() - 6, + h = div.height() - 2, x = bw.ie || bw.opera ? 4 : 0; - $('#compose-body_ifr').width(w+3).height(h-2 - $('div.mce-toolbar').height()); + $('#compose-body_ifr').width(w + 6).height(h - 1 - $('div.mce-toolbar').height()); $('#compose-body').width(w-x).height(h); - $('#googie_edit_layer').height(h); + $('#googie_edit_layer').width(w).height(h); }, resize_compose_body_ev: function() diff --git a/skins/classic/googiespell.css b/skins/classic/googiespell.css index b4fab5bdb..fc6b069a1 100644 --- a/skins/classic/googiespell.css +++ b/skins/classic/googiespell.css @@ -9,7 +9,7 @@ .googie_edit_layer { background-color: #ffffff; - padding: 0 4px; + padding: 1px 3px; font-size: 9pt; font-family: monospace; } diff --git a/skins/larry/googiespell.css b/skins/larry/googiespell.css index d2f1cea78..2241ccd58 100644 --- a/skins/larry/googiespell.css +++ b/skins/larry/googiespell.css @@ -8,10 +8,7 @@ } .googie_edit_layer { - position: relative; - top: 1px; - left: 1px; - padding: 8px; + padding: 4px; font-size: 9pt; font-family: monospace; background-color: #fff; @@ -26,7 +23,7 @@ width: 100%; margin: 0; padding: 0; - border-spacing: 0; + border-spacing: 0; } .googie_list td { diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 0f1eaa8a7..9a2fe6974 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1305,13 +1305,13 @@ div.message-partheaders .headers-table td.header { width: 99%; border: 0; border-radius: 0 0 0 4px; - padding: 8px 0 8px 8px; + padding: 4px; resize: none; font-family: monospace; font-size: 9pt; outline: none; - box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); - -webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); + box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); + -webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.1); } #composebody:active, diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 5cd216724..c8204b603 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -502,7 +502,7 @@ function rcube_mail_ui() $('#composebodycontainer > div').width(w+8); $('#composebody_ifr').height(h + 4 - $('div.mce-toolbar').height()); - $('#googie_edit_layer').height(h - 8); + $('#googie_edit_layer').width(w).height(h); // $('#composebodycontainer')[(btns ? 'addClass' : 'removeClass')]('buttons'); // $('#composeformbuttons')[(btns ? 'show' : 'hide')](); |