mirror of
https://github.com/zotero/zotero.git
synced 2026-09-19 00:01:31 +00:00
Allow EPUBs saved from the web to be dragged out of parent
This commit is contained in:
parent
d462330347
commit
b00b23306d
2 changed files with 6 additions and 2 deletions
|
|
@ -2189,8 +2189,11 @@ var ItemTree = class ItemTree extends LibraryTree {
|
|||
}
|
||||
|
||||
// Don't allow web attachments to be dragged out of parents,
|
||||
// but do allow PDFs for now so they can be recognized
|
||||
if (item.isWebAttachment() && item.attachmentContentType != 'application/pdf') {
|
||||
// except for files that can be recognized
|
||||
if (item.isWebAttachment()
|
||||
// Keep in sync with Zotero.RecognizeDocument.canRecognize()
|
||||
&& !item.isPDFAttachment()
|
||||
&& !item.isEPUBAttachment()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ Zotero.RecognizeDocument = new function () {
|
|||
*/
|
||||
this.canRecognize = function (item) {
|
||||
return item.attachmentContentType
|
||||
// Keep in sync with dragging out of parent in ItemTree::canDropCheck()
|
||||
&& (item.isPDFAttachment() || item.isEPUBAttachment())
|
||||
&& item.isTopLevelItem();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue