mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 20:49:08 +01:00
- Add flag to turn off auto-paste actions
- Turn off auto-paste actions when drop has multiple choices - paste is not valid during a real drop.
This commit is contained in:
parent
57f2e3c859
commit
103c0c73ad
@ -625,9 +625,15 @@ function egwDropActionImplementation()
|
||||
// set of properties.
|
||||
var popup = getPopupImplementation();
|
||||
var pos = popup._getPageXY(event.originalEvent);
|
||||
|
||||
// Don't add paste actions, this is a drop
|
||||
popup.auto_paste = false;
|
||||
|
||||
window.setTimeout(function() {
|
||||
popup.doExecuteImplementation(pos, selected, links,
|
||||
_context);
|
||||
// Reset, popup is reused
|
||||
popup.auto_paste = true;
|
||||
}, 0); // Timeout is needed to have it working in IE
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,8 @@ function egwPopupActionImplementation()
|
||||
|
||||
ai.type = "popup";
|
||||
|
||||
ai.auto_paste = true;
|
||||
|
||||
/**
|
||||
* Registers the handler for the default action
|
||||
*
|
||||
@ -541,7 +543,10 @@ function egwPopupActionImplementation()
|
||||
var tree = {"root": []};
|
||||
|
||||
// Automatically add in Drag & Drop actions
|
||||
this._addCopyPaste(_links,_selected);
|
||||
if(this.auto_paste)
|
||||
{
|
||||
this._addCopyPaste(_links,_selected);
|
||||
}
|
||||
|
||||
for (var k in _links)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user