diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-03-26 19:36:47 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-03-26 19:36:47 +0100 |
commit | 1d4c84f4d74217a6639b143c14c99e3473fc539a (patch) | |
tree | 60309240eda210d5d570a760aeba0b4b4125e1fe | |
parent | 723f4e63aa2e60e0ef72cdfb506299512a9c3405 (diff) |
Remove sig_above configuration option, use reply_mode only (#1489001)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/main.inc.php.dist | 3 | ||||
-rw-r--r-- | program/js/app.js | 6 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 3 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 3 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 15 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 1 |
7 files changed, 6 insertions, 26 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Remove sig_above configuration option, use reply_mode only (#1489001) - Refresh current folder in opener window after draft save or message sent (#1488997) - Fix saving draft just after entering compose window (#1489012) - Call resize handler in intervals to prevent lags and double onresize calls in Chrome (#1489005) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index b113b41a8..5a652a5b1 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -835,9 +835,6 @@ $rcmail_config['strip_existing_sig'] = true; // 3 - Forwards and Replies only $rcmail_config['show_sig'] = 1; -// When replying or forwarding place sender's signature above existing message -$rcmail_config['sig_above'] = false; - // Use MIME encoding (quoted-printable) for 8bit characters in message body $rcmail_config['force_7bit'] = false; diff --git a/program/js/app.js b/program/js/app.js index 758e4b893..ad82ba579 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3376,7 +3376,7 @@ function rcube_webmail() sig = this.env.signatures[sig].text; sig = sig.replace(/\r\n/g, '\n'); - p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig); + p = this.env.top_posting ? message.indexOf(sig) : message.lastIndexOf(sig); if (p >= 0) message = message.substring(0, p) + message.substring(p+sig.length, message.length); } @@ -3385,7 +3385,7 @@ function rcube_webmail() sig = this.env.signatures[id].text; sig = sig.replace(/\r\n/g, '\n'); - if (this.env.sig_above) { + if (this.env.top_posting) { if (p >= 0) { // in place of removed signature message = message.substring(0, p) + sig + message.substring(p, message.length); cursor_pos = p - 1; @@ -3429,7 +3429,7 @@ function rcube_webmail() sigElem = doc.createElement('div'); sigElem.setAttribute('id', '_rc_sig'); - if (this.env.sig_above) { + if (this.env.top_posting) { // if no existing sig and top posting then insert at caret pos editor.getWin().focus(); // correct focus in IE & Chrome diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 252e0ce68..0a4e329e5 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -454,9 +454,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from $labels['autoaddsignature'] = 'Automatically add signature'; $labels['newmessageonly'] = 'new message only'; $labels['replyandforwardonly'] = 'replies and forwards only'; -$labels['replysignaturepos'] = 'When replying or forwarding place signature'; -$labels['belowquote'] = 'below the quote'; -$labels['abovequote'] = 'above the quote'; $labels['insertsignature'] = 'Insert signature'; $labels['previewpanemarkread'] = 'Mark previewed messages as read'; $labels['afternseconds'] = 'after $n seconds'; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 129d43701..cc7cf687f 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -139,7 +139,6 @@ if (!empty($CONFIG['drafts_mbox'])) { } // set current mailbox in client environment $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); -$OUTPUT->set_env('sig_above', $RCMAIL->config->get('sig_above', false)); $OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0); $OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ','))); @@ -462,7 +461,7 @@ function rcmail_compose_header_from($attrib) if (count($MESSAGE->identities)) { $a_signatures = array(); - $separator = $RCMAIL->config->get('sig_above') + $separator = intval($RCMAIL->config->get('reply_mode')) > 0 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 2f726c7e8..319c58db9 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -581,8 +581,7 @@ function rcmail_user_prefs($current=null) if (!isset($no_override['reply_mode'])) { $field_id = 'rcmfd_reply_mode'; - $select_replymode = new html_select(array('name' => '_reply_mode', 'id' => $field_id, - 'onchange' => "\$('#rcmfd_sig_above').attr('disabled',this.selectedIndex<2)")); + $select_replymode = new html_select(array('name' => '_reply_mode', 'id' => $field_id)); $select_replymode->add(rcube_label('replyempty'), -1); $select_replymode->add(rcube_label('replybottomposting'), 0); $select_replymode->add(rcube_label('replytopposting'), 1); @@ -631,18 +630,6 @@ function rcmail_user_prefs($current=null) ); } - if (!isset($no_override['sig_above'])) { - $field_id = 'rcmfd_sig_above'; - $select_sigabove = new html_select(array('name' => '_sig_above', 'id' => $field_id, 'disabled' => $config['reply_mode'] < 1)); - $select_sigabove->add(rcube_label('belowquote'), 0); - $select_sigabove->add(rcube_label('abovequote'), 1); - - $blocks['sig']['options']['sig_above'] = array( - 'title' => html::label($field_id, Q(rcube_label('replysignaturepos'))), - 'content' => $select_sigabove->show($config['sig_above']?1:0), - ); - } - if (!isset($no_override['strip_existing_sig'])) { $field_id = 'rcmfd_strip_existing_sig'; $input_stripexistingsig = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1)); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 5daab0d24..140f173c6 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -86,7 +86,6 @@ switch ($CURR_SECTION) 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, 'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0, 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), - 'sig_above' => !empty($_POST['_sig_above']) && $_POST['_reply_mode'] > 0, 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), 'forward_attachment' => !empty($_POST['_forward_attachment']), ); |