summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-08 16:26:56 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-08 16:26:56 +0200
commitf50a66c616bdc46ac0c568e1efdeb979477db4db (patch)
tree1c03b00112ea1155b48b317a37599caa03b82b57
parentaafbe8efdca6dfef736e623dd5da83d64ae10aef (diff)
Enable listmode switch if listing is not multi-folder
-rw-r--r--program/js/app.js18
-rw-r--r--program/steps/mail/func.inc2
2 files changed, 12 insertions, 8 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 2a7783fad..952c542a0 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3,8 +3,8 @@
| Roundcube Webmail Client Script |
| |
| This file is part of the Roundcube Webmail client |
- | Copyright (C) 2005-2013, The Roundcube Dev Team |
- | Copyright (C) 2011-2013, Kolab Systems AG |
+ | Copyright (C) 2005-2014, The Roundcube Dev Team |
+ | Copyright (C) 2011-2014, Kolab Systems AG |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
@@ -222,7 +222,7 @@ function rcube_webmail()
this.gui_objects.messagelist.parentNode.onmousedown = function(e){ return p.click_on_list(e); };
this.enable_command('toggle_status', 'toggle_flag', 'sort', true);
- this.enable_command('set-listmode', this.env.threads && !this.env.search_request);
+ this.enable_command('set-listmode', this.env.threads && !this.is_multifolder_listing());
// load messages
this.command('list');
@@ -1715,7 +1715,7 @@ function rcube_webmail()
case 'mail':
return (this.env.mailboxes[id]
&& !this.env.mailboxes[id].virtual
- && (this.env.mailboxes[id].id != this.env.mailbox || this.is_multifolder_search())) ? 1 : 0;
+ && (this.env.mailboxes[id].id != this.env.mailbox || this.is_multifolder_listing())) ? 1 : 0;
case 'settings':
return id != this.env.mailbox ? 1 : 0;
@@ -2698,7 +2698,7 @@ function rcube_webmail()
return this.folder_selector(obj, function(folder) { ref.command('move', folder); });
// exit if current or no mailbox specified
- if (!mbox || (mbox == this.env.mailbox && !this.is_multifolder_search()))
+ if (!mbox || (mbox == this.env.mailbox && !this.is_multifolder_listing()))
return;
var lock = false, post_data = this.selection_post_data({_target_mbox: mbox});
@@ -2767,7 +2767,7 @@ function rcube_webmail()
this._with_selected_messages = function(action, post_data, lock)
{
var count = 0, msg,
- remove = (action == 'delete' || !this.is_multifolder_search());
+ remove = (action == 'delete' || !this.is_multifolder_listing());
// update the list (remove rows, clear selection)
if (this.message_list) {
@@ -4273,9 +4273,10 @@ function rcube_webmail()
this.env.search_mods[mbox] = mods;
};
- this.is_multifolder_search = function()
+ this.is_multifolder_listing = function()
{
- return this.env.search_request && (this.env.search_scope || 'base') != 'base';
+ return typeof this.env.multifolder_listing != 'undefined' ? this.env.multifolder_listing :
+ (this.env.search_request && (this.env.search_scope || 'base') != 'base');
}
this.sent_successfully = function(type, msg, folders)
@@ -7060,6 +7061,7 @@ function rcube_webmail()
this.enable_command('expunge', this.env.exists);
this.enable_command('purge', this.purge_mailbox_test());
this.enable_command('expand-all', 'expand-unread', 'collapse-all', this.env.threading && this.env.messagecount);
+ this.enable_command('set-listmode', this.env.threads && !this.is_multifolder_listing());
if ((response.action == 'list' || response.action == 'search') && this.message_list) {
this.msglist_select(this.message_list);
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index a541fca96..630086a68 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -393,6 +393,8 @@ function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null
$OUTPUT->command('select_folder', '');
}
+ $OUTPUT->set_env('multifolder_listing', $multifolder);
+
if (empty($a_headers)) {
return;
}