From 66f3c1d5884ff846c44c2755cdda8ca99e017ee0 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 24 Jun 2014 08:49:39 +0000 Subject: [PATCH] Strg+A (select all): if there is only one mail, even if the message is correct, regarding all messages in the mailbox; skip it --- mail/js/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 037ea2ec17..f86c714e89 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1261,7 +1261,7 @@ app.classes.mail = AppJS.extend( } } var msg = this.mail_getFormData(_elems); - msg['all'] = this.mail_checkAllSelected(_action,true); + msg['all'] = ((typeof _elems != 'undefined' && _elems.length>1)?this.mail_checkAllSelected(_action,true):false); if (msg['all']) msg['activeFilters'] = this.mail_getActiveFilters(_action); //alert(_action.id+','+ msg); if (!calledFromPopup) this.mail_setRowClass(_elems,'deleted'); @@ -1635,7 +1635,7 @@ app.classes.mail = AppJS.extend( if (do_nmactions) { msg = this.mail_getFormData(_elems); - msg['all'] = this.mail_checkAllSelected(_action,true); + msg['all'] = ((typeof _elems != 'undefined' && _elems.length>1)?this.mail_checkAllSelected(_action,true):false); msg['activeFilters'] = this.mail_getActiveFilters(_action); if (_action.id.substring(0,2)=='un') { //old style, only available for undelete and unlabel (no toggle) @@ -2468,7 +2468,7 @@ app.classes.mail = AppJS.extend( //alert('mail_move('+messages.msg.join(',')+' --> '+target+')'); // TODO: Write move/copy function which cares about doing the same stuff // as the "onNodeSelect" function! - messages['all'] = this.mail_checkAllSelected(_action,true); + messages['all'] = ((typeof _senders != 'undefined' && _senders.length>1)?this.mail_checkAllSelected(_action,true):false); if (messages['all']) messages['activeFilters'] = this.mail_getActiveFilters(_action); egw.json('mail.mail_ui.ajax_copyMessages',[target, messages, 'move']) @@ -2491,7 +2491,7 @@ app.classes.mail = AppJS.extend( //alert('mail_copy('+messages.msg.join(',')+' --> '+target+')'); // TODO: Write move/copy function which cares about doing the same stuff // as the "onNodeSelect" function! - messages['all'] = this.mail_checkAllSelected(_action,true); + messages['all'] = ((typeof _senders != 'undefined' && _senders.length>1)?this.mail_checkAllSelected(_action,true):false); if (messages['all']) messages['activeFilters'] = this.mail_getActiveFilters(_action); egw.json('mail.mail_ui.ajax_copyMessages',[target, messages])