www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 100bf182daeeb0685c8b6cdd6de8515bf7ede92d
parent d4e2b42d46601f2975c5fe29a5f7a2d26382f3e9
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  1 Oct 2006 19:59:34 +0000

Fixed regression from r696 -- snapshots not getting saved to the current collection


Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -666,9 +666,20 @@ var ScholarPane = new function() function addAttachmentFromPage(link, id) { if(link) - Scholar.Attachments.linkFromDocument(window.content.document, id); + { + var attachmentID = + Scholar.Attachments.linkFromDocument(window.content.document, id); + } else - Scholar.Attachments.importFromDocument(window.content.document, id); + { + var attachmentID = + Scholar.Attachments.importFromDocument(window.content.document, id); + } + + if (attachmentID && itemsView && itemsView._itemGroup.isCollection()) + { + itemsView._itemGroup.ref.addItem(attachmentID); + } } function viewSelectedAttachment()