diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index bcf2c0fcca..32ead604ae 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -425,6 +425,7 @@ class mail_hooks 'name' => 'prefaskformove', 'values' => $no_yes_copy, 'xmlrpc' => True, + 'default'=> 2, 'admin' => False, 'forced' => '1', ), diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 8c9fcb085a..f39ed19c18 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -533,6 +533,25 @@ class mail_ui 'onExecute' => 'javaScript:app.mail.edit_acl', ), ); + // the preference prefaskformove controls actually if there is a popup on target or not + // if there are multiple options there is a popup on target, 0 for prefaskformove means + // that only move is available; 1 stands for move and cancel; 2 (should be the default if + // not set); so we are assuming this, when not set + if (isset($this->mail_bo->mailPreferences['prefaskformove'])) + { + switch ($this->mail_bo->mailPreferences['prefaskformove']) + { + case 0: + unset($tree_actions['drop_copy_mail']); + unset($tree_actions['drop_cancel']); + break; + case 1: + unset($tree_actions['drop_copy_mail']); + break; + default: + // everything is fine + } + } //error_log(__METHOD__.__LINE__.' showAllFoldersInFolderPane:'.$this->mail_bo->mailPreferences['showAllFoldersInFolderPane'].'/'.$GLOBALS['egw_info']['user']['preferences']['mail']['showAllFoldersInFolderPane']); if ($this->mail_bo->mailPreferences['showAllFoldersInFolderPane']) { diff --git a/mail/js/app.js b/mail/js/app.js index 3fa2643119..8577d5822d 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2088,7 +2088,6 @@ app.classes.mail = AppJS.extend( */ mail_move: function(_action,_senders,_target) { //console.log(_action,_senders,_target); - //egw.preference('prefaskformove','mail'); var target = _action.id == 'drop_move_mail' ? _target.iface.id : _action.id.substr(5); var messages = this.mail_getFormData(_senders); //alert('mail_move('+messages.msg.join(',')+' --> '+target+')');