From 6e96b74e5dca644a24311a94a3688adf2f74f646 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 15 Jul 2014 11:41:14 +0000 Subject: [PATCH] Fix confirmation dialog messages for move/copy mail --- mail/js/app.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index da9c14453e..4657cffd09 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1561,7 +1561,7 @@ app.classes.mail = AppJS.extend( {text: this.egw.lang("Yes"), id: "all", class: "ui-priority-primary", "default": true}, {text: this.egw.lang("Cancel"), id:"cancel"} ]; - var messageToDisplay = this.egw.lang("Do you really want to apply %1 to ALL messages in current view?",this.egw.lang(_action.id))+" "; + var messageToDisplay = ''; switch (_action.id) { case "unlabel": @@ -1573,10 +1573,21 @@ app.classes.mail = AppJS.extend( case "flagged": case "read": case "undelete": - messageToDisplay = this.egw.lang("Do you really want to toggle flag %1 for ALL messages in current view?",this.egw.lang(_action.id))+" "; + messageToDisplay = this.egw.lang("Do you really want to toggle flag %1 for ALL messages in the current view?",this.egw.lang(_action.id))+" "; break; + default: + var type = null; + if (_action.id.substr(0,4)=='move' || _action.id === "drop_move_mail") + { + type = 'Move'; + } + if (_action.id.substr(0,4)=='copy' || _action.id === "drop_copy_mail") + { + type = 'Copy'; + } + messageToDisplay = this.egw.lang("Do you really want to apply %1 to ALL messages in the current view?",this.egw.lang(type?type:_action.id))+" "; } - return et2_dialog.show_dialog(function(_button_id, _value) { + return et2_dialog.show_dialog(function(_button_id) { var rv = false; switch (_button_id) {