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
|
@ -1189,6 +1189,7 @@ Zotero.CollectionTreeView.prototype.canDrop = function(row, orient, dragData)
|
||||||
if (!dragData || !dragData.data) {
|
if (!dragData || !dragData.data) {
|
||||||
var dragData = Zotero.DragDrop.getDragData(this);
|
var dragData = Zotero.DragDrop.getDragData(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dragData) {
|
if (!dragData) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1770,6 +1771,10 @@ Zotero.CollectionTreeView.prototype.onDragEnter = function (event) {
|
||||||
* Called by HTML 5 Drag and Drop when dragging over the tree
|
* Called by HTML 5 Drag and Drop when dragging over the tree
|
||||||
*/
|
*/
|
||||||
Zotero.CollectionTreeView.prototype.onDragOver = function (event, dropdata, session) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user