www

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

commit 02efb5690299856b1c9a2ca50f1d05031dd91ee5
parent ecf0f3397c49e975d98ad98d7a240c9b771a572a
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun, 30 Jan 2011 09:52:51 +0000

fix some ZoteroPane references


Diffstat:
Mchrome/content/zotero/advancedSearch.js | 7++-----
Mchrome/content/zotero/bindings/noteeditor.xml | 11++---------
Mchrome/content/zotero/bindings/relatedbox.xml | 8++++----
Mchrome/content/zotero/browser.js | 4++--
Mchrome/content/zotero/lookup.js | 5+++--
Mchrome/content/zotero/xpcom/connector.js | 5+++--
Mchrome/content/zotero/xpcom/mimeTypeHandler.js | 5+++--
7 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js @@ -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(); } } diff --git a/chrome/content/zotero/bindings/noteeditor.xml b/chrome/content/zotero/bindings/noteeditor.xml @@ -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(); diff --git a/chrome/content/zotero/bindings/relatedbox.xml b/chrome/content/zotero/bindings/relatedbox.xml @@ -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> diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js @@ -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; } diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js @@ -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); diff --git a/chrome/content/zotero/xpcom/connector.js b/chrome/content/zotero/xpcom/connector.js @@ -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) }); diff --git a/chrome/content/zotero/xpcom/mimeTypeHandler.js b/chrome/content/zotero/xpcom/mimeTypeHandler.js @@ -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) });