From 3ec33534dc482fb1227ede510f56c32d4c5b8a6a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 19 Nov 2014 20:13:46 +0000 Subject: [PATCH] Add a paste flag to get around mail's check for all rows selected to ignore current selection when pasting --- mail/js/app.js | 2 +- phpgwapi/js/egw_action/egw_action_popup.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mail/js/app.js b/mail/js/app.js index 3f6e2af3ee..11da73c774 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1702,7 +1702,7 @@ app.classes.mail = AppJS.extend( var obj_manager = egw_getObjectManager(this.appname).getObjectById(this.nm_index); var that = this; var rvMain = false; - if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected()) || _action.id=='readall') + if ((obj_manager && _elems.length>1 && obj_manager.getAllSelected() && !_action.paste) || _action.id=='readall') { if (_confirm) { diff --git a/phpgwapi/js/egw_action/egw_action_popup.js b/phpgwapi/js/egw_action/egw_action_popup.js index 43c7faba3a..95574baa1d 100644 --- a/phpgwapi/js/egw_action/egw_action_popup.js +++ b/phpgwapi/js/egw_action/egw_action_popup.js @@ -722,7 +722,12 @@ function egwPopupActionImplementation() var clipboard = JSON.parse(egw.getSessionItem('phpgwapi', 'egw_clipboard')); // Fake drop position drop[action.id].actionObj.ui = ui; + // Set a flag so apps can tell the difference, if they need to + drop[action.id].actionObj.paste = true; + drop[action.id].actionObj.execute(clipboard.selected,selected[0]); + + drop[action.id].actionObj.paste = false; }; var clipboard = JSON.parse(egw.getSessionItem('phpgwapi', 'egw_clipboard')) || {