fix some ZoteroPane references
This commit is contained in:
parent
ecf0f3397c
commit
02efb56902
7 changed files with 19 additions and 26 deletions
|
@ -152,11 +152,8 @@ var ZoteroAdvancedSearch = new function() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (lastWin.document.getElementById('zotero-pane').getAttribute('hidden') == 'true') {
|
||||
lastWin.ZoteroOverlay.toggleDisplay();
|
||||
}
|
||||
|
||||
lastWin.ZoteroPane.selectItem(item.getID(), false, true);
|
||||
lastWin.ZoteroPane.show();
|
||||
lastWin.ZoteroPane.getActiveZoteroPane.selectItem(item.getID(), false, true);
|
||||
lastWin.focus();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -317,15 +317,8 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (lastWin.document.getElementById('zotero-pane').getAttribute('hidden') == 'true') {
|
||||
lastWin.ZoteroOverlay.toggleDisplay();
|
||||
|
||||
// DEBUG: The actions below seem to crash Firefox 2.0.0.1 on OS X if
|
||||
// the Z pane isn't already open, so we don't try
|
||||
return;
|
||||
}
|
||||
|
||||
var zp = lastWin.ZoteroPane;
|
||||
lastWin.ZoteroPane.show();
|
||||
var zp = lastWin.ZoteroPane.getActiveZoteroPane();
|
||||
}
|
||||
|
||||
var parentID = this.item.getSource();
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
var p;
|
||||
if(window.ZoteroPane)
|
||||
{
|
||||
p = window.ZoteroPane;
|
||||
p = window.ZoteroPane.getActiveZoteroPane();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -242,10 +242,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
p = win.ZoteroPane;
|
||||
p = win.ZoteroPane.getActiveZoteroPane();
|
||||
}
|
||||
|
||||
p.selectItem(id);
|
||||
|
||||
if(p) p.selectItem(id);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
|
|
|
@ -153,8 +153,8 @@ var Zotero_Browser = new function() {
|
|||
var libraryID, collectionID;
|
||||
var pane = ZoteroOverlay.getActiveZoteroPane();
|
||||
if(pane) {
|
||||
libraryID = ZoteroPane.getSelectedLibraryID();
|
||||
collectionID = ZoteroPane.getSelectedCollection(true);
|
||||
libraryID = pane.getSelectedLibraryID();
|
||||
collectionID = pane.getSelectedCollection(true);
|
||||
} else {
|
||||
libraryID = collectionID = null;
|
||||
}
|
||||
|
|
|
@ -68,8 +68,9 @@ const Zotero_Lookup = new function () {
|
|||
var libraryID = null;
|
||||
var collection = false;
|
||||
try {
|
||||
libraryID = window.opener.ZoteroPane.getSelectedLibraryID();
|
||||
collection = window.opener.ZoteroPane.getSelectedCollection();
|
||||
var zp = window.opener.ZoteroPane.getActiveZoteroPane();
|
||||
libraryID = zp.getSelectedLibraryID();
|
||||
collection = zp.getSelectedCollection();
|
||||
} catch(e) {}
|
||||
translate.setHandler("itemDone", function(obj, item) {
|
||||
if(collection) collection.addItem(item.id);
|
||||
|
|
|
@ -703,8 +703,9 @@ Zotero.Connector.Translate.Save.prototype = {
|
|||
this._libraryID = null;
|
||||
var collection = null;
|
||||
try {
|
||||
this._libraryID = win.ZoteroPane.getSelectedLibraryID();
|
||||
collection = win.ZoteroPane.getSelectedCollection();
|
||||
var zp = win.ZoteroPane.getActiveZoteroPane();
|
||||
this._libraryID = zp.getSelectedLibraryID();
|
||||
collection = zp.getSelectedCollection();
|
||||
} catch(e) {}
|
||||
var me = this;
|
||||
translate.setHandler("select", function(obj, item) { return me._selectItems(obj, item) });
|
||||
|
|
|
@ -118,8 +118,9 @@ Zotero.MIMETypeHandler = new function () {
|
|||
var libraryID = null;
|
||||
var collection = null;
|
||||
try {
|
||||
libraryID = frontWindow.ZoteroPane.getSelectedLibraryID();
|
||||
collection = frontWindow.ZoteroPane.getSelectedCollection();
|
||||
var zp = frontWindow.ZoteroPane.getActiveZoteroPane();
|
||||
libraryID = zp.getSelectedLibraryID();
|
||||
collection = zp.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) });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue