From 5d78e25bbbc16e22aa28e99818da89c22aa7e74d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 19 Aug 2009 13:04:32 +0000 Subject: [PATCH] Zotero.Item.isImportedAttachment() --- chrome/content/zotero/xpcom/data/item.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 17d5997767..43b511a7be 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2397,6 +2397,18 @@ Zotero.Item.prototype.isWebAttachment = function() { } +Zotero.Item.prototype.isImportedAttachment = function() { + if (!this.isAttachment()) { + return false; + } + var linkMode = this.attachmentLinkMode; + if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE || linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL) { + return false; + } + return true; +} + + /** * Returns number of child attachments of item *