Add a paste flag to get around mail's check for all rows selected to ignore current selection when pasting

This commit is contained in:
Nathan Gray 2014-11-19 20:13:46 +00:00
parent c738952af8
commit 3ec33534dc
2 changed files with 6 additions and 1 deletions

View File

@ -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)
{

View File

@ -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')) || {