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

This commit is contained in:
Dan Stillman 2006-10-01 19:59:34 +00:00
parent d4e2b42d46
commit 100bf182da

View File

@ -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()