Check linked collections in both directions
This commit is contained in:
parent
d0d7aec4b0
commit
c180bce0f0
|
@ -1811,7 +1811,7 @@ Zotero.CollectionTreeView.prototype.canDropCheckAsync = Zotero.Promise.coroutine
|
||||||
// Dragging a collection to a different library
|
// Dragging a collection to a different library
|
||||||
if (treeRow.ref.libraryID != draggedCollection.libraryID) {
|
if (treeRow.ref.libraryID != draggedCollection.libraryID) {
|
||||||
// Disallow if linked collection already exists
|
// Disallow if linked collection already exists
|
||||||
if (yield draggedCollection.getLinkedCollection(treeRow.ref.libraryID)) {
|
if (yield draggedCollection.getLinkedCollection(treeRow.ref.libraryID, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1822,7 +1822,7 @@ Zotero.CollectionTreeView.prototype.canDropCheckAsync = Zotero.Promise.coroutine
|
||||||
//
|
//
|
||||||
// If this is allowed in the future for the root collection,
|
// If this is allowed in the future for the root collection,
|
||||||
// need to allow drag only to root
|
// need to allow drag only to root
|
||||||
if (yield descendent.getLinkedCollection(treeRow.ref.libraryID)) {
|
if (yield descendent.getLinkedCollection(treeRow.ref.libraryID, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user