Allow dragging onto welcome text
This commit is contained in:
parent
91512469d5
commit
59edca783e
3 changed files with 17 additions and 2 deletions
|
@ -1765,6 +1765,8 @@ Zotero.ItemTreeView.prototype._updateIntroText = function() {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
div.setAttribute('allowdrop', true);
|
||||
}
|
||||
// My Publications
|
||||
else if (this.collectionTreeRow.isPublications()) {
|
||||
|
|
|
@ -328,7 +328,17 @@ Zotero.LibraryTreeView.prototype = {
|
|||
|
||||
var target = event.target;
|
||||
if (target.tagName != 'treechildren') {
|
||||
return false;
|
||||
let doc = target.ownerDocument;
|
||||
// Consider a drop on the items pane message box (e.g., when showing the welcome text)
|
||||
// a drop on the items tree
|
||||
let msgBox = doc.getElementById('zotero-items-pane-message-box');
|
||||
if (msgBox.contains(target) && msgBox.firstChild.hasAttribute('allowdrop')) {
|
||||
target = doc.querySelector('#zotero-items-tree treechildren');
|
||||
}
|
||||
else {
|
||||
this._setDropEffect(event, "none");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var tree = target.parentNode;
|
||||
let row = {}, col = {}, obj = {};
|
||||
|
|
|
@ -565,7 +565,10 @@
|
|||
|
||||
<!-- Label for displaying messages when items pane is hidden
|
||||
(e.g. "Advanced search mode — press Enter to search.")-->
|
||||
<vbox id="zotero-items-pane-message-box" pack="center" align="center"/>
|
||||
<vbox id="zotero-items-pane-message-box" pack="center" align="center"
|
||||
ondragenter="return ZoteroPane.itemsView.onDragEnter(event)"
|
||||
ondragover="return ZoteroPane.itemsView.onDragOver(event)"
|
||||
ondrop="ZoteroPane.itemsView.onDrop(event); ZoteroPane.itemsView.drop(-1, -1, event.dataTransfer)"/>
|
||||
</deck>
|
||||
</vbox>
|
||||
|
||||
|
|
Loading…
Reference in a new issue