Show the + symbol when dragging items between collections or libraries
TODO: don't show symbol when the item can't be dropped
This commit is contained in:
parent
2e2f7e3f84
commit
7b4f16e233
1 changed files with 5 additions and 0 deletions
|
@ -1189,6 +1189,7 @@ Zotero.CollectionTreeView.prototype.canDrop = function(row, orient, dragData)
|
|||
if (!dragData || !dragData.data) {
|
||||
var dragData = Zotero.DragDrop.getDragData(this);
|
||||
}
|
||||
|
||||
if (!dragData) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1770,6 +1771,10 @@ Zotero.CollectionTreeView.prototype.onDragEnter = function (event) {
|
|||
* Called by HTML 5 Drag and Drop when dragging over the tree
|
||||
*/
|
||||
Zotero.CollectionTreeView.prototype.onDragOver = function (event, dropdata, session) {
|
||||
// Show copy symbol when dragging an item over a collection
|
||||
if (event.dataTransfer.getData("zotero/item")) {
|
||||
event.dataTransfer.dropEffect = "copy";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue