summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-10-30 12:20:29 +0100
committerThomas Bruederli <thomas@roundcube.net>2013-10-30 12:20:29 +0100
commit1723f9225182712d87d28eec998540069dba1cef (patch)
tree33006e2f5b817f8540b5f43a926b60255dbfb5f0
parent5b334509a80dd2d447a505944c6c5cb63447dd1f (diff)
parented119d3639db9cb1e9553bc5a7e9a1ca81ece98d (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
-rw-r--r--CHANGELOG1
-rw-r--r--config/defaults.inc.php5
-rw-r--r--program/js/app.js2
-rw-r--r--program/js/list.js20
-rw-r--r--program/localization/en_US/labels.inc3
-rw-r--r--program/steps/mail/func.inc1
-rw-r--r--program/steps/settings/func.inc18
-rw-r--r--program/steps/settings/save_prefs.inc1
-rw-r--r--skins/classic/functions.js2
-rw-r--r--skins/larry/ui.js2
10 files changed, 36 insertions, 19 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5b0e7086e..558f4e6f7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Add an option to disable smart Reply-List behaviour - reply_all_mode (#1488734)
- Fix an issue where pressing minus key on contacts list was hiding list records (#1489393)
- Fix an issue where shift + arrow-up key wasn't selecting all messages in collapsed thread (#1489397)
- Added icon for priority column in messages list header (#1489234)
diff --git a/config/defaults.inc.php b/config/defaults.inc.php
index 9e4ba11bf..ab0e188bd 100644
--- a/config/defaults.inc.php
+++ b/config/defaults.inc.php
@@ -1023,3 +1023,8 @@ $config['default_font_size'] = '10pt';
// Enables display of email address with name instead of a name (and address in title)
$config['message_show_email'] = false;
+
+// Default behavior of Reply-All button:
+// 0 - Reply-All always
+// 1 - Reply-List if mailing list is detected
+$config['reply_all_mode'] = 0;
diff --git a/program/js/app.js b/program/js/app.js
index 59105ffb6..81b796ec1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1065,7 +1065,7 @@ function rcube_webmail()
url = {_reply_uid: uid, _mbox: this.env.mailbox};
if (command == 'reply-all')
// do reply-list, when list is detected and popup menu wasn't used
- url._all = (!props && this.commands['reply-list'] ? 'list' : 'all');
+ url._all = (!props && this.env.reply_all_mode == 1 && this.commands['reply-list'] ? 'list' : 'all');
else if (command == 'reply-list')
url._all = 'list';
diff --git a/program/js/list.js b/program/js/list.js
index 8ad0a336b..b85ea61ca 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -856,14 +856,8 @@ select_first: function(mod_key)
{
var row = this.get_first_row();
if (row) {
- if (mod_key) {
- this.shift_select(row, mod_key);
- this.triggerEvent('select');
- this.scrollto(row);
- }
- else {
- this.select(row);
- }
+ this.select_row(row, mod_key, false);
+ this.scrollto(row);
}
},
@@ -875,14 +869,8 @@ select_last: function(mod_key)
{
var row = this.get_last_row();
if (row) {
- if (mod_key) {
- this.shift_select(row, mod_key);
- this.triggerEvent('select');
- this.scrollto(row);
- }
- else {
- this.select(row);
- }
+ this.select_row(row, mod_key, false);
+ this.scrollto(row);
}
},
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 69ef2505c..8f221a3a9 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -493,6 +493,9 @@ $labels['standardwindows'] = 'Handle popups as standard windows';
$labels['forwardmode'] = 'Messages forwarding';
$labels['inline'] = 'inline';
$labels['asattachment'] = 'as attachment';
+$labels['replyallmode'] = 'Default action of [Reply all] button';
+$labels['replyalldefault'] = 'reply to all';
+$labels['replyalllist'] = 'reply to mailing list only (if found)';
$labels['folder'] = 'Folder';
$labels['folders'] = 'Folders';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 70441e0d7..3c1c2bb65 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -97,6 +97,7 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
$OUTPUT->set_env('delimiter', $delimiter);
$OUTPUT->set_env('threading', $threading);
$OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD'));
+ $OUTPUT->set_env('reply_all_mode', (int) $RCMAIL->config->get('reply_all_mode'));
$OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0));
if ($RCMAIL->storage->get_capability('QUOTA')) {
$OUTPUT->set_env('quota', true);
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 38bb09c8d..c922aca08 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -869,6 +869,24 @@ function rcmail_user_prefs($current = null)
$select_default_font_size->show($RCMAIL->config->get('default_font_size', 1))
);
}
+
+ if (!isset($no_override['reply_all_mode'])) {
+ if (!$current) {
+ continue 2;
+ }
+
+ $field_id = 'rcmfd_reply_all_mode';
+ $select = new html_select(array('name' => '_reply_all_mode', 'id' => $field_id));
+
+ $select->add(rcube_label('replyalldefault'), 0);
+ $select->add(rcube_label('replyalllist'), 1);
+
+ $blocks['main']['options']['reply_all_mode'] = array(
+ 'title' => html::label($field_id, Q(rcube_label('replyallmode'))),
+ 'content' => $select->show(intval($config['reply_all_mode'])),
+ );
+ }
+
break;
// Addressbook config
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 717c7ad8c..bcd05bb85 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -90,6 +90,7 @@ switch ($CURR_SECTION)
'strip_existing_sig' => isset($_POST['_strip_existing_sig']),
'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST),
'default_font_size' => get_input_value('_default_font_size', RCUBE_INPUT_POST),
+ 'reply_all_mode' => intval($_POST['_reply_all_mode']),
'forward_attachment' => !empty($_POST['_forward_attachment']),
);
diff --git a/skins/classic/functions.js b/skins/classic/functions.js
index 4ad13136f..8d81c3ad2 100644
--- a/skins/classic/functions.js
+++ b/skins/classic/functions.js
@@ -625,7 +625,7 @@ prev_sibling: function(elm)
enable_command: function(p)
{
- if (p.command == 'reply-list') {
+ if (p.command == 'reply-list' && rcmail.env.reply_all_mode == 1) {
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
$('a.button.replyAll').attr('title', label);
}
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index d558f16a2..0fd0241f7 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -473,7 +473,7 @@ function rcube_mail_ui()
function enable_command(p)
{
- if (p.command == 'reply-list') {
+ if (p.command == 'reply-list' && rcmail.env.reply_all_mode == 1) {
var label = rcmail.gettext(p.status ? 'replylist' : 'replyall');
if (rcmail.env.action == 'preview')
$('a.button.replyall').attr('title', label);