- Fix download overlay
- Fix RIS/Refer intercept progress
This commit is contained in:
parent
b1cec43982
commit
ba12583b22
3 changed files with 19 additions and 6 deletions
|
@ -70,9 +70,15 @@ var Zotero_DownloadOverlay = new function() {
|
|||
// set up callback
|
||||
var callback = function(item) {
|
||||
if(!win) return;
|
||||
|
||||
if(item) win.Zotero_Browser.itemDone(null, item);
|
||||
win.Zotero_Browser.finishScraping(null, !!item);
|
||||
|
||||
if(item) {
|
||||
progressWin.addLines([item.getDisplayTitle()], [item.getImageSrc()]);
|
||||
progressWin.startCloseTimer();
|
||||
if(collection) collection.addItem(item.id);
|
||||
} else {
|
||||
progressWin.addDescription(Zotero.getString("save.link.error"));
|
||||
progressWin.startCloseTimer(8000);
|
||||
}
|
||||
|
||||
if(recognizePDF) {
|
||||
var timer = Components.classes["@mozilla.org/timer;1"]
|
||||
|
@ -90,7 +96,9 @@ var Zotero_DownloadOverlay = new function() {
|
|||
};
|
||||
|
||||
// show progress dialog
|
||||
win.Zotero_Browser.progress.show();
|
||||
var progressWin = new Zotero.ProgressWindow();
|
||||
progressWin.changeHeadline(Zotero.getString("save.link"));
|
||||
progressWin.show();
|
||||
|
||||
// perform import
|
||||
Zotero.Attachments.importFromURL(url, false, false, false,
|
||||
|
|
|
@ -159,8 +159,12 @@ Zotero.MIMETypeHandler = new function () {
|
|||
libraryID = frontWindow.ZoteroPane.getSelectedLibraryID();
|
||||
collection = frontWindow.ZoteroPane.getSelectedCollection();
|
||||
} catch(e) {}
|
||||
translation.setHandler("itemDone", function(obj, item) { frontWindow.Zotero_Browser.itemDone(obj, item, collection) });
|
||||
translation.setHandler("done", function(obj, item) { frontWindow.Zotero_Browser.finishScraping(obj, item, collection) });
|
||||
translation.setHandler("itemDone", function(obj, dbItem, item) {
|
||||
frontWindow.Zotero_Browser.itemDone(obj, dbItem, item, collection);
|
||||
});
|
||||
translation.setHandler("done", function(obj, item) {
|
||||
frontWindow.Zotero_Browser.finishScraping(obj, item, collection);
|
||||
});
|
||||
|
||||
// attempt to retrieve translators
|
||||
var translators = translation.getTranslators();
|
||||
|
|
|
@ -395,6 +395,7 @@ fileTypes.document = Document
|
|||
|
||||
save.attachment = Saving Snapshot...
|
||||
save.link = Saving Link...
|
||||
save.link.error = An error occurred while saving this link.
|
||||
|
||||
ingester.saveToZotero = Save to Zotero
|
||||
ingester.scraping = Saving Item...
|
||||
|
|
Loading…
Add table
Reference in a new issue