www

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

commit 11fc88973cdd78ab172253b8ee82055d12a6a795
parent d4a779dd53955b0607e9fbef5f8a2a3550647465
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue,  8 Mar 2011 23:46:01 +0000

use ZoteroPane_Local to refer to local ZoteroPane, if there are multiple ZoteroPanes running in the
same window. this fixes tabbing behavior in the Zotero Tab, and likely also a bunch of issues we
haven't found yet.


Diffstat:
Mchrome/content/zotero/zoteroPane.js | 148+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mchrome/content/zotero/zoteroPane.xul | 160++++++++++++++++++++++++++++++++++++++++----------------------------------------
2 files changed, 157 insertions(+), 151 deletions(-)

diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -106,7 +106,7 @@ var ZoteroPane = new function() document.getElementById('zotero-tb-actions-reportErrors').setAttribute('label', Zotero.getString('errorReport.reportErrors')); // Set key down handler - document.getElementById('appcontent').addEventListener('keydown', ZoteroPane.handleKeyDown, true); + document.getElementById('appcontent').addEventListener('keydown', ZoteroPane_Local.handleKeyDown, true); if (Zotero.locked) { return; @@ -138,16 +138,16 @@ var ZoteroPane = new function() var collectionsTree = document.getElementById('zotero-collections-tree'); collectionsTree.view = this.collectionsView; collectionsTree.controllers.appendController(new Zotero.CollectionTreeCommandController(collectionsTree)); - collectionsTree.addEventListener("click", ZoteroPane.onTreeClick, true); + collectionsTree.addEventListener("click", ZoteroPane_Local.onTreeClick, true); var itemsTree = document.getElementById('zotero-items-tree'); itemsTree.controllers.appendController(new Zotero.ItemTreeCommandController(itemsTree)); - itemsTree.addEventListener("click", ZoteroPane.onTreeClick, true); + itemsTree.addEventListener("click", ZoteroPane_Local.onTreeClick, true); this.buildItemTypeMenus(); var menu = document.getElementById("contentAreaContextMenu"); - menu.addEventListener("popupshowing", ZoteroPane.contextPopupShowing, false); + menu.addEventListener("popupshowing", ZoteroPane_Local.contextPopupShowing, false); Zotero.Keys.windowInit(document); @@ -264,7 +264,7 @@ var ZoteroPane = new function() for (var i = 0; i<itemTypes.length; i++) { var menuitem = document.createElement("menuitem"); menuitem.setAttribute("label", itemTypes[i].localized); - menuitem.setAttribute("oncommand","ZoteroPane.newItem("+itemTypes[i]['id']+")"); + menuitem.setAttribute("oncommand","ZoteroPane_Local.newItem("+itemTypes[i]['id']+")"); menuitem.setAttribute("tooltiptext", ""); menuitem.className = "zotero-tb-add"; addMenu.insertBefore(menuitem, separator); @@ -293,7 +293,7 @@ var ZoteroPane = new function() for (var i = 0; i<itemTypes.length; i++) { var menuitem = document.createElement("menuitem"); menuitem.setAttribute("label", itemTypes[i].localized); - menuitem.setAttribute("oncommand","ZoteroPane.newItem("+itemTypes[i]['id']+")"); + menuitem.setAttribute("oncommand","ZoteroPane_Local.newItem("+itemTypes[i]['id']+")"); menuitem.setAttribute("tooltiptext", ""); menuitem.className = "zotero-tb-add"; moreMenu.appendChild(menuitem); @@ -330,7 +330,7 @@ var ZoteroPane = new function() function makeVisible() { // If pane not loaded, load it or display an error message - if (!ZoteroPane.loaded) { + if (!ZoteroPane_Local.loaded) { if (Zotero.locked) { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); @@ -338,7 +338,7 @@ var ZoteroPane = new function() ps.alert(null, "", msg); return false; } - ZoteroPane.init(); + ZoteroPane_Local.init(); } // If Zotero could not be initialized, display an error message and return @@ -397,7 +397,7 @@ var ZoteroPane = new function() } /** - * Function to be called before ZoteroPane is hidden. Does not actually hide the Zotero pane. + * Function to be called before ZoteroPane_Local is hidden. Does not actually hide the Zotero pane. */ this.makeHidden = function() { this.serializePersist(); @@ -446,7 +446,7 @@ var ZoteroPane = new function() createInstance(Components.interfaces.nsITimer); // {} implements nsITimerCallback this.highlightTimer.initWithCallback({ - notify: ZoteroPane.setHighlightedRowsCallback + notify: ZoteroPane_Local.setHighlightedRowsCallback }, 225, Components.interfaces.nsITimer.TYPE_ONE_SHOT); } else if ((Zotero.isWin && event.ctrlKey) || @@ -455,7 +455,7 @@ var ZoteroPane = new function() this.highlightTimer.cancel(); this.highlightTimer = null; } - ZoteroPane.collectionsView.setHighlightedRows(); + ZoteroPane_Local.collectionsView.setHighlightedRows(); } return; @@ -509,38 +509,38 @@ var ZoteroPane = new function() break; case 'library': document.getElementById('zotero-collections-tree').focus(); - ZoteroPane.collectionsView.selection.select(0); + ZoteroPane_Local.collectionsView.selection.select(0); break; case 'quicksearch': document.getElementById('zotero-tb-search').select(); break; case 'newItem': - ZoteroPane.newItem(2); // book + ZoteroPane_Local.newItem(2); // book var menu = document.getElementById('zotero-editpane-item-box').itemTypeMenu; menu.focus(); document.getElementById('zotero-editpane-item-box').itemTypeMenu.menupopup.openPopup(menu, "before_start", 0, 0); break; case 'newNote': // Use key that's not the modifier as the popup toggle - ZoteroPane.newNote(useShift ? event.altKey : event.shiftKey); + ZoteroPane_Local.newNote(useShift ? event.altKey : event.shiftKey); break; case 'toggleTagSelector': - ZoteroPane.toggleTagSelector(); + ZoteroPane_Local.toggleTagSelector(); break; case 'toggleFullscreen': - ZoteroPane.toggleTab(); + ZoteroPane_Local.toggleTab(); break; case 'copySelectedItemCitationsToClipboard': - ZoteroPane.copySelectedItemsToClipboard(true) + ZoteroPane_Local.copySelectedItemsToClipboard(true) break; case 'copySelectedItemsToClipboard': - ZoteroPane.copySelectedItemsToClipboard(); + ZoteroPane_Local.copySelectedItemsToClipboard(); break; case 'importFromClipboard': Zotero_File_Interface.importFromClipboard(); break; default: - throw ('Command "' + command + '" not found in ZoteroPane.handleKeyDown()'); + throw ('Command "' + command + '" not found in ZoteroPane_Local.handleKeyDown()'); } } @@ -561,7 +561,7 @@ var ZoteroPane = new function() this.highlightTimer.cancel(); this.highlightTimer = null; } - ZoteroPane.collectionsView.setHighlightedRows(); + ZoteroPane_Local.collectionsView.setHighlightedRows(); } } } @@ -572,11 +572,11 @@ var ZoteroPane = new function() * Option/Alt (Mac/Linux) press */ function setHighlightedRowsCallback() { - var itemIDs = ZoteroPane.getSelectedItems(true); + var itemIDs = ZoteroPane_Local.getSelectedItems(true); if (itemIDs && itemIDs.length) { var collectionIDs = Zotero.Collections.getCollectionsContainingItems(itemIDs, true); if (collectionIDs) { - ZoteroPane.collectionsView.setHighlightedRows(collectionIDs); + ZoteroPane_Local.collectionsView.setHighlightedRows(collectionIDs); } } } @@ -586,7 +586,7 @@ var ZoteroPane = new function() if (from == 'zotero-collections-tree') { if ((event.keyCode == event.DOM_VK_BACK_SPACE && Zotero.isMac) || event.keyCode == event.DOM_VK_DELETE) { - ZoteroPane.deleteSelectedCollection(); + ZoteroPane_Local.deleteSelectedCollection(); event.preventDefault(); return; } @@ -597,7 +597,7 @@ var ZoteroPane = new function() // If Cmd/Ctrl delete, use forced mode, which does different // things depending on the context var force = event.metaKey || (!Zotero.isMac && event.ctrlKey); - ZoteroPane.deleteSelectedItems(force); + ZoteroPane_Local.deleteSelectedItems(force); event.preventDefault(); return; } @@ -1145,7 +1145,7 @@ var ZoteroPane = new function() this.updateNoteButtonMenu = function () { - var items = ZoteroPane.getSelectedItems(); + var items = ZoteroPane_Local.getSelectedItems(); var button = document.getElementById('zotero-tb-add-child-note'); button.disabled = !this.canEdit() || !(items.length == 1 && (items[0].isRegularItem() || !items[0].isTopLevelItem())); @@ -1153,7 +1153,7 @@ var ZoteroPane = new function() this.updateAttachmentButtonMenu = function (popup) { - var items = ZoteroPane.getSelectedItems(); + var items = ZoteroPane_Local.getSelectedItems(); var disabled = !this.canEdit() || !(items.length == 1 && items[0].isRegularItem()); @@ -1187,7 +1187,7 @@ var ZoteroPane = new function() break; default: - throw ("Invalid class name '" + node.className + "' in ZoteroPane.updateAttachmentButtonMenu()"); + throw ("Invalid class name '" + node.className + "' in ZoteroPane_Local.updateAttachmentButtonMenu()"); } } } @@ -1213,7 +1213,7 @@ var ZoteroPane = new function() null, null, null, {} ); if (index == 0) { - ZoteroPane.openPreferences('zotero-prefpane-search', 'pdftools-install'); + ZoteroPane_Local.openPreferences('zotero-prefpane-search', 'pdftools-install'); } return false; } @@ -1280,7 +1280,7 @@ var ZoteroPane = new function() this.deleteSelectedItem = function () { - Zotero.debug("ZoteroPane.deleteSelectedItem() is deprecated -- use ZoteroPane.deleteSelectedItems()"); + Zotero.debug("ZoteroPane_Local.deleteSelectedItem() is deprecated -- use ZoteroPane_Local.deleteSelectedItems()"); this.deleteSelectedItems(); } @@ -1676,12 +1676,12 @@ var ZoteroPane = new function() // Events that turn find-as-you-type on if (event.keyCode == event.DOM_VK_ESCAPE) { textbox.value = ''; - ZoteroPane.setItemsPaneMessage(Zotero.getString('searchInProgress')); - setTimeout("ZoteroPane.search(); ZoteroPane.clearItemsPaneMessage();", 1); + ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress')); + setTimeout("ZoteroPane_Local.search(); ZoteroPane_Local.clearItemsPaneMessage();", 1); } else if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_ENTER) { - ZoteroPane.setItemsPaneMessage(Zotero.getString('searchInProgress')); - setTimeout("ZoteroPane.search(true); ZoteroPane.clearItemsPaneMessage();", 1); + ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress')); + setTimeout("ZoteroPane_Local.search(true); ZoteroPane_Local.clearItemsPaneMessage();", 1); } } @@ -1690,11 +1690,11 @@ var ZoteroPane = new function() // This is the new length, except, it seems, when the change is a // result of Undo or Redo if (!textbox.value.length) { - ZoteroPane.setItemsPaneMessage(Zotero.getString('searchInProgress')); - setTimeout("ZoteroPane.search(); ZoteroPane.clearItemsPaneMessage();", 1); + ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('searchInProgress')); + setTimeout("ZoteroPane_Local.search(); ZoteroPane_Local.clearItemsPaneMessage();", 1); } else if (textbox.value.indexOf('"') != -1) { - ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode')); + ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('advancedSearchMode')); } } @@ -1730,7 +1730,7 @@ var ZoteroPane = new function() } if (!this.itemsView) { - Components.utils.reportError("Items view not set in ZoteroPane.selectItem()"); + Components.utils.reportError("Items view not set in ZoteroPane_Local.selectItem()"); return false; } @@ -2350,11 +2350,11 @@ var ZoteroPane = new function() return; } - var itemGroup = ZoteroPane.collectionsView._getItemAtRow(tree.view.selection.currentIndex); + var itemGroup = ZoteroPane_Local.collectionsView._getItemAtRow(tree.view.selection.currentIndex); if (itemGroup.isLibrary()) { var uri = Zotero.URI.getCurrentUserLibraryURI(); if (uri) { - ZoteroPane.loadURI(uri); + ZoteroPane_Local.loadURI(uri); event.stopPropagation(); } return; @@ -2365,13 +2365,13 @@ var ZoteroPane = new function() if ((itemGroup.ref.id + "").match(/^8634533000/)) { // 'UNFILED000' return; } - ZoteroPane.editSelectedCollection(); + ZoteroPane_Local.editSelectedCollection(); return; } if (itemGroup.isGroup()) { var uri = Zotero.URI.getGroupURI(itemGroup.ref, true); - ZoteroPane.loadURI(uri); + ZoteroPane_Local.loadURI(uri); event.stopPropagation(); return; } @@ -2379,14 +2379,14 @@ var ZoteroPane = new function() if (itemGroup.isHeader()) { if (itemGroup.ref.id == 'group-libraries-header') { var uri = Zotero.URI.getGroupsURL(); - ZoteroPane.loadURI(uri); + ZoteroPane_Local.loadURI(uri); event.stopPropagation(); } return; } if (itemGroup.isBucket()) { - ZoteroPane.loadURI(itemGroup.ref.uri); + ZoteroPane_Local.loadURI(itemGroup.ref.uri); event.stopPropagation(); } } @@ -2405,17 +2405,17 @@ var ZoteroPane = new function() } if (tree.view && tree.view.selection.currentIndex > -1) { - var item = ZoteroPane.getSelectedItems()[0]; + var item = ZoteroPane_Local.getSelectedItems()[0]; if (item) { if (item.isRegularItem()) { // Double-click on Commons item should load IA page - var itemGroup = ZoteroPane.collectionsView._getItemAtRow( - ZoteroPane.collectionsView.selection.currentIndex + var itemGroup = ZoteroPane_Local.collectionsView._getItemAtRow( + ZoteroPane_Local.collectionsView.selection.currentIndex ); if (itemGroup.isBucket()) { var uri = itemGroup.ref.getItemURI(item); - ZoteroPane.loadURI(uri); + ZoteroPane_Local.loadURI(uri); event.stopPropagation(); return; } @@ -2432,7 +2432,7 @@ var ZoteroPane = new function() if (spec) { uri.spec = spec; if (uri.scheme && uri.scheme == 'file') { - ZoteroPane.viewAttachment(snapID, event); + ZoteroPane_Local.viewAttachment(snapID, event); return; } } @@ -2450,17 +2450,17 @@ var ZoteroPane = new function() } } if (uri) { - ZoteroPane.loadURI(uri); + ZoteroPane_Local.loadURI(uri); } } else if (item.isNote()) { - if (!ZoteroPane.collectionsView.editable) { + if (!ZoteroPane_Local.collectionsView.editable) { return; } document.getElementById('zotero-view-note-button').doCommand(); } else if (item.isAttachment()) { - ZoteroPane.viewSelectedAttachment(event); + ZoteroPane_Local.viewSelectedAttachment(event); } } } @@ -2589,8 +2589,8 @@ var ZoteroPane = new function() var menuitem = document.getElementById("zotero-context-add-to-current-note"); var showing = false; if (menuitem){ - var items = ZoteroPane.getSelectedItems(); - if (ZoteroPane.itemsView.selection && ZoteroPane.itemsView.selection.count==1 + var items = ZoteroPane_Local.getSelectedItems(); + if (ZoteroPane_Local.itemsView.selection && ZoteroPane_Local.itemsView.selection.count==1 && items[0] && items[0].isNote() && window.gContextMenu.isTextSelected) { @@ -2785,7 +2785,7 @@ var ZoteroPane = new function() return; } - var itemGroup = ZoteroPane.collectionsView._getItemAtRow(this.collectionsView.selection.currentIndex); + var itemGroup = ZoteroPane_Local.collectionsView._getItemAtRow(this.collectionsView.selection.currentIndex); if (link && itemGroup.isWithinGroup()) { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); @@ -2982,7 +2982,7 @@ var ZoteroPane = new function() // If native type, save using a hidden browser if (hasNativeHandler) { var processor = function (doc) { - ZoteroPane.addItemFromDocument(doc, itemType, saveSnapshot, row); + ZoteroPane_Local.addItemFromDocument(doc, itemType, saveSnapshot, row); }; var done = function () {} @@ -3004,22 +3004,22 @@ var ZoteroPane = new function() // Duplicate newItem() checks here // if (!Zotero.stateCheck()) { - ZoteroPane.displayErrorMessage(true); + ZoteroPane_Local.displayErrorMessage(true); return false; } // Currently selected row if (row === undefined) { - row = ZoteroPane.collectionsView.selection.currentIndex; + row = ZoteroPane_Local.collectionsView.selection.currentIndex; } - if (!ZoteroPane.canEdit(row)) { - ZoteroPane.displayCannotEditLibraryMessage(); + if (!ZoteroPane_Local.canEdit(row)) { + ZoteroPane_Local.displayCannotEditLibraryMessage(); return; } if (row !== undefined) { - var itemGroup = ZoteroPane.collectionsView._getItemAtRow(row); + var itemGroup = ZoteroPane_Local.collectionsView._getItemAtRow(row); var libraryID = itemGroup.ref.libraryID; } else { @@ -3030,8 +3030,8 @@ var ZoteroPane = new function() // // - if (!ZoteroPane.canEditFiles(row)) { - ZoteroPane.displayCannotEditLibraryFilesMessage(); + if (!ZoteroPane_Local.canEditFiles(row)) { + ZoteroPane_Local.displayCannotEditLibraryFilesMessage(); return; } @@ -3060,7 +3060,7 @@ var ZoteroPane = new function() itemType = 'webpage'; } - var item = ZoteroPane.newItem(itemType, {}, row); + var item = ZoteroPane_Local.newItem(itemType, {}, row); if (item.libraryID) { var group = Zotero.Groups.getByLibraryID(item.libraryID); @@ -3109,7 +3109,7 @@ var ZoteroPane = new function() } if (typeof itemID != 'number') { - throw ("itemID must be an integer in ZoteroPane.addAttachmentFromPage()"); + throw ("itemID must be an integer in ZoteroPane_Local.addAttachmentFromPage()"); } var progressWin = new Zotero.ProgressWindow(); @@ -3132,7 +3132,7 @@ var ZoteroPane = new function() function viewAttachment(itemID, event, noLocateOnMissing, forceExternalViewer) { var attachment = Zotero.Items.get(itemID); if (!attachment.isAttachment()) { - throw ("Item " + itemID + " is not an attachment in ZoteroPane.viewAttachment()"); + throw ("Item " + itemID + " is not an attachment in ZoteroPane_Local.viewAttachment()"); } if (attachment.attachmentLinkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) { @@ -3314,7 +3314,7 @@ var ZoteroPane = new function() for (var i=0; i<items.length; i++) { var item = items[i]; if (!item.isTopLevelItem() || item.isRegularItem()) { - throw('Item ' + itemID + ' is not a top-level attachment or note in ZoteroPane.createParentItemsFromSelected()'); + throw('Item ' + itemID + ' is not a top-level attachment or note in ZoteroPane_Local.createParentItemsFromSelected()'); } Zotero.DB.beginTransaction(); @@ -3351,7 +3351,7 @@ var ZoteroPane = new function() var item = items[i]; if (!item.isAttachment() || !item.getSource() || item.attachmentLinkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) { - throw('Item ' + itemID + ' is not a child file attachment in ZoteroPane.renameAttachmentFromParent()'); + throw('Item ' + itemID + ' is not a child file attachment in ZoteroPane_Local.renameAttachmentFromParent()'); } var file = item.getFile(); @@ -3389,7 +3389,7 @@ var ZoteroPane = new function() var item = Zotero.Items.get(itemID); if (!item) { - throw('Item ' + itemID + ' not found in ZoteroPane.relinkAttachment()'); + throw('Item ' + itemID + ' not found in ZoteroPane_Local.relinkAttachment()'); } var nsIFilePicker = Components.interfaces.nsIFilePicker; @@ -3489,7 +3489,7 @@ var ZoteroPane = new function() // instructions // window.loadURI('chrome://zotero/content/error.xul'); //if(asPaneMessage) { - // ZoteroPane.setItemsPaneMessage(errMsg, true); + // ZoteroPane_Local.setItemsPaneMessage(errMsg, true); //} else { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); @@ -3580,4 +3580,10 @@ var ZoteroPane = new function() toolbar.style.width = computedStyle.getPropertyValue("width"); } } -} -\ No newline at end of file +} + +/** + * Keep track of which ZoteroPane was local (since ZoteroPane object might get swapped out for a + * tab's ZoteroPane) + */ +var ZoteroPane_Local = ZoteroPane; +\ No newline at end of file diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul @@ -46,8 +46,8 @@ <script src="locateMenu.js" type="application/javascript;version=1.7"/> <commandset id="mainCommandSet"> - <command id="cmd_zotero_search" oncommand="ZoteroPane.search();"/> - <command id="cmd_zotero_reportErrors" oncommand="ZoteroPane.reportErrors();"/> + <command id="cmd_zotero_search" oncommand="ZoteroPane_Local.search();"/> + <command id="cmd_zotero_reportErrors" oncommand="ZoteroPane_Local.reportErrors();"/> </commandset> <popup id="contentAreaContextMenu"> @@ -55,16 +55,16 @@ <menupopup> <menuitem id="zotero-context-add-to-current-note" class="menu-iconic" label="&zotero.contextMenu.addTextToCurrentNote;" hidden="true" - oncommand="var str = event.currentTarget.ownerDocument.popupNode.ownerDocument.defaultView.getSelection().toString(); var uri = event.currentTarget.ownerDocument.popupNode.ownerDocument.location.href; ZoteroPane.addTextToNote(str, uri)"/> + oncommand="var str = event.currentTarget.ownerDocument.popupNode.ownerDocument.defaultView.getSelection().toString(); var uri = event.currentTarget.ownerDocument.popupNode.ownerDocument.location.href; ZoteroPane_Local.addTextToNote(str, uri)"/> <menuitem id="zotero-context-add-to-new-note" class="menu-iconic" label="&zotero.contextMenu.addTextToNewNote;" hidden="true" - oncommand="var str = event.currentTarget.ownerDocument.popupNode.ownerDocument.defaultView.getSelection().toString(); var uri = event.currentTarget.ownerDocument.popupNode.ownerDocument.location.href; var itemID = ZoteroPane.addItemFromPage(); ZoteroPane.newNote(false, itemID, str, uri)"/> + oncommand="var str = event.currentTarget.ownerDocument.popupNode.ownerDocument.defaultView.getSelection().toString(); var uri = event.currentTarget.ownerDocument.popupNode.ownerDocument.location.href; var itemID = ZoteroPane_Local.addItemFromPage(); ZoteroPane_Local.newNote(false, itemID, str, uri)"/> <menuitem id="zotero-context-save-link-as-item" class="menu-iconic" label="&zotero.contextMenu.saveLinkAsItem;" hidden="true" - oncommand="ZoteroPane.addItemFromURL(window.gContextMenu.linkURL, 'temporaryPDFHack')"/> + oncommand="ZoteroPane_Local.addItemFromURL(window.gContextMenu.linkURL, 'temporaryPDFHack')"/> <menuitem id="zotero-context-save-image-as-item" class="menu-iconic" label="&zotero.contextMenu.saveImageAsItem;" hidden="true" - oncommand="ZoteroPane.addItemFromURL(window.gContextMenu.onImage ? (window.gContextMenu.mediaURL ? window.gContextMenu.mediaURL : window.gContextMenu.imageURL) : window.gContextMenu.bgImageURL, 'artwork')"/> + oncommand="ZoteroPane_Local.addItemFromURL(window.gContextMenu.onImage ? (window.gContextMenu.mediaURL ? window.gContextMenu.mediaURL : window.gContextMenu.imageURL) : window.gContextMenu.bgImageURL, 'artwork')"/> </menupopup> </menu> </popup> @@ -77,14 +77,14 @@ </box> <vbox id="zotero-pane" - onkeydown="ZoteroPane.handleKeyDown(event, this.id)" - onkeyup="ZoteroPane.handleKeyUp(event, this.id)" + onkeydown="ZoteroPane_Local.handleKeyDown(event, this.id)" + onkeyup="ZoteroPane_Local.handleKeyUp(event, this.id)" chromedir="&locale.dir;"> <toolbar id="zotero-toolbar" class="toolbar" fullscreentoolbar="true"> <hbox id="zotero-collections-toolbar"> - <toolbarbutton id="zotero-tb-collection-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/> - <toolbarbutton id="zotero-tb-group-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newGroup;" oncommand="ZoteroPane.newGroup()"/> + <toolbarbutton id="zotero-tb-collection-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane_Local.newCollection()"/> + <toolbarbutton id="zotero-tb-group-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newGroup;" oncommand="ZoteroPane_Local.newGroup()"/> <spacer flex="1"/> <toolbarbutton id="zotero-tb-actions-menu" class="zotero-tb-button" tooltiptext="&zotero.toolbar.actions.label;" type="menu"> <menupopup id="zotero-tb-actions-popup" onpopupshowing="document.getElementById('cmd_zotero_reportErrors').setAttribute('disabled', Zotero.getErrors().length == 0)"> @@ -96,15 +96,15 @@ label="Search for Shared Libraries" oncommand="Zotero.Zeroconf.findInstances()"/> <menuseparator id="zotero-tb-actions-plugins-separator"/> <menuitem id="zotero-tb-actions-timeline" label="&zotero.toolbar.timeline.label;" oncommand="Zotero_Timeline_Interface.loadTimeline()"/> - <!-- TODO: localize <menuitem id="zotero-tb-actions-duplicate" label="&zotero.toolbar.duplicate.label;" oncommand="ZoteroPane.showDuplicates()"/>--> - <menuitem id="zotero-tb-actions-showDuplicates" label="Show Duplicates" oncommand="ZoteroPane.showDuplicates()" hidden="true"/> + <!-- TODO: localize <menuitem id="zotero-tb-actions-duplicate" label="&zotero.toolbar.duplicate.label;" oncommand="ZoteroPane_Local.showDuplicates()"/>--> + <menuitem id="zotero-tb-actions-showDuplicates" label="Show Duplicates" oncommand="ZoteroPane_Local.showDuplicates()" hidden="true"/> <menuseparator hidden="true" id="zotero-tb-actions-sync-separator"/> <menuitem hidden="true" label="WebDAV Sync Debugging" disabled="true"/> <menuitem hidden="true" label=" Purge Deleted Storage Files" oncommand="Zotero.Sync.Storage.purgeDeletedStorageFiles('webdav', function(results) { Zotero.debug(results); })"/> <menuitem hidden="true" label=" Purge Orphaned Storage Files" oncommand="Zotero.Sync.Storage.purgeOrphanedStorageFiles('webdav', function(results) { Zotero.debug(results); })"/> <menuseparator id="zotero-tb-actions-separator"/> <menuitem id="zotero-tb-actions-prefs" label="&zotero.toolbar.preferences.label;" - oncommand="ZoteroPane.openPreferences()"/> + oncommand="ZoteroPane_Local.openPreferences()"/> <menuitem id="zotero-tb-actions-reportErrors" command="cmd_zotero_reportErrors" disabled="true"/> <menuitem id="zotero-tb-actions-support" label="&zotero.toolbar.supportAndDocumentation;" oncommand="gBrowser.selectedTab = gBrowser.addTab('http://www.zotero.org/support/')"/> <menuitem id="zotero-tb-actions-about" label="&zotero.toolbar.about.label;" oncommand="window.openDialog('chrome://zotero/content/about.xul', 'about', 'chrome')"/> @@ -117,37 +117,37 @@ <!-- New Item drop-down built in overlay.js::onLoad() --> <menupopup> <menuseparator/> - <menuitem label="&zotero.toolbar.attachment.linked;" oncommand="ZoteroPane.addAttachmentFromDialog(true);" tooltiptext=""/> - <menuitem label="&zotero.toolbar.attachment.add;" oncommand="ZoteroPane.addAttachmentFromDialog();" tooltiptext=""/> + <menuitem label="&zotero.toolbar.attachment.linked;" oncommand="ZoteroPane_Local.addAttachmentFromDialog(true);" tooltiptext=""/> + <menuitem label="&zotero.toolbar.attachment.add;" oncommand="ZoteroPane_Local.addAttachmentFromDialog();" tooltiptext=""/> <menuseparator/> <menu label="&zotero.toolbar.moreItemTypes.label;" tooltiptext=""> <menupopup id="zotero-tb-add-more"/> </menu> </menupopup> </toolbarbutton> - <toolbarbutton id="zotero-tb-item-from-page" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newItemFromPage.label;" oncommand="ZoteroPane.addItemFromPage('temporaryPDFHack', event.shiftKey ? !Zotero.Prefs.get('automaticSnapshots') : null)"/> - <toolbarbutton id="zotero-tb-lookup" class="zotero-tb-button" tooltiptext="&zotero.toolbar.lookup.label;" oncommand="ZoteroPane.openLookupWindow()"/> - <!--<toolbarbutton id="zotero-tb-note-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.note.standalone;" oncommand="ZoteroPane.newNote(event.shiftKey);"/>--> + <toolbarbutton id="zotero-tb-item-from-page" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newItemFromPage.label;" oncommand="ZoteroPane_Local.addItemFromPage('temporaryPDFHack', event.shiftKey ? !Zotero.Prefs.get('automaticSnapshots') : null)"/> + <toolbarbutton id="zotero-tb-lookup" class="zotero-tb-button" tooltiptext="&zotero.toolbar.lookup.label;" oncommand="ZoteroPane_Local.openLookupWindow()"/> + <!--<toolbarbutton id="zotero-tb-note-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.note.standalone;" oncommand="ZoteroPane_Local.newNote(event.shiftKey);"/>--> <toolbarbutton id="zotero-tb-note-add" class="zotero-tb-button" tooltiptext="New Note" type="menu"> - <menupopup onpopupshowing="ZoteroPane.updateNoteButtonMenu()"> - <menuitem label="Add Standalone Note" oncommand="ZoteroPane.newNote(event.shiftKey);"/> - <menuitem id="zotero-tb-add-child-note" label="Add Child Note" oncommand="var selected = ZoteroPane.getSelectedItems()[0]; var parent = selected.getSource(); parent = parent ? parent : selected.id; ZoteroPane.newNote(event.shiftKey, parent);"/> + <menupopup onpopupshowing="ZoteroPane_Local.updateNoteButtonMenu()"> + <menuitem label="Add Standalone Note" oncommand="ZoteroPane_Local.newNote(event.shiftKey);"/> + <menuitem id="zotero-tb-add-child-note" label="Add Child Note" oncommand="var selected = ZoteroPane_Local.getSelectedItems()[0]; var parent = selected.getSource(); parent = parent ? parent : selected.id; ZoteroPane_Local.newNote(event.shiftKey, parent);"/> </menupopup> </toolbarbutton> <toolbarbutton id="zotero-tb-attachment-add" class="zotero-tb-button" tooltiptext="New Child Attachment" type="menu"> - <menupopup onpopupshowing="ZoteroPane.updateAttachmentButtonMenu(this)"> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-snapshot" label="&zotero.items.menu.attach.snapshot;" oncommand="var itemID = ZoteroPane.getSelectedItems()[0].id; ZoteroPane.addAttachmentFromPage(false, itemID)"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-web-link" label="&zotero.items.menu.attach.link;" oncommand="var itemID = ZoteroPane.getSelectedItems()[0].id; ZoteroPane.addAttachmentFromPage(true, itemID)"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-file" label="Attach Stored Copy of File..." oncommand="var itemID = ZoteroPane.getSelectedItems()[0].id; ZoteroPane.addAttachmentFromDialog(false, itemID);"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-link" label="Attach Link to File..." oncommand="var itemID = ZoteroPane.getSelectedItems()[0].id; ZoteroPane.addAttachmentFromDialog(true, itemID);"/> + <menupopup onpopupshowing="ZoteroPane_Local.updateAttachmentButtonMenu(this)"> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-snapshot" label="&zotero.items.menu.attach.snapshot;" oncommand="var itemID = ZoteroPane_Local.getSelectedItems()[0].id; ZoteroPane_Local.addAttachmentFromPage(false, itemID)"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-web-link" label="&zotero.items.menu.attach.link;" oncommand="var itemID = ZoteroPane_Local.getSelectedItems()[0].id; ZoteroPane_Local.addAttachmentFromPage(true, itemID)"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-file" label="Attach Stored Copy of File..." oncommand="var itemID = ZoteroPane_Local.getSelectedItems()[0].id; ZoteroPane_Local.addAttachmentFromDialog(false, itemID);"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-link" label="Attach Link to File..." oncommand="var itemID = ZoteroPane_Local.getSelectedItems()[0].id; ZoteroPane_Local.addAttachmentFromDialog(true, itemID);"/> </menupopup> </toolbarbutton> <toolbarseparator/> - <toolbarbutton id="zotero-tb-advanced-search" class="zotero-tb-button" tooltiptext="&zotero.toolbar.advancedSearch;" oncommand="ZoteroPane.openAdvancedSearchWindow()"/> + <toolbarbutton id="zotero-tb-advanced-search" class="zotero-tb-button" tooltiptext="&zotero.toolbar.advancedSearch;" oncommand="ZoteroPane_Local.openAdvancedSearchWindow()"/> <spacer flex="1"/> <textbox id="zotero-tb-search" type="search" timeout="250" command="cmd_zotero_search" dir="reverse" - onkeypress="ZoteroPane.handleSearchKeypress(this, event)" - oninput="ZoteroPane.handleSearchInput(this, event)"> + onkeypress="ZoteroPane_Local.handleSearchKeypress(this, event)" + oninput="ZoteroPane_Local.handleSearchInput(this, event)"> </textbox> </hbox> @@ -205,55 +205,55 @@ </tooltip> </toolbarbutton> <toolbarseparator id="zotero-fullscreen-close-separator"/> - <toolbarbutton id="zotero-tb-fullscreen" tooltiptext="&zotero.toolbar.tab.tooltip;" oncommand="ZoteroPane.toggleTab();" class="zotero-tb-button"/> + <toolbarbutton id="zotero-tb-fullscreen" tooltiptext="&zotero.toolbar.tab.tooltip;" oncommand="ZoteroPane_Local.toggleTab();" class="zotero-tb-button"/> <toolbarbutton id="zotero-close-button" class="tabs-closebutton" oncommand="ZoteroOverlay.toggleDisplay()"/> </hbox> </toolbar> <popupset> - <menupopup id="zotero-collectionmenu" onpopupshowing="ZoteroPane.buildCollectionContextMenu();"> - <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/> - <menuitem label="&zotero.toolbar.newSavedSearch.label;" oncommand="ZoteroPane.newSearch()"/> - <menuitem label="&zotero.toolbar.newSubcollection.label;" oncommand="ZoteroPane.newCollection(ZoteroPane.getSelectedCollection().id)"/> + <menupopup id="zotero-collectionmenu" onpopupshowing="ZoteroPane_Local.buildCollectionContextMenu();"> + <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane_Local.newCollection()"/> + <menuitem label="&zotero.toolbar.newSavedSearch.label;" oncommand="ZoteroPane_Local.newSearch()"/> + <menuitem label="&zotero.toolbar.newSubcollection.label;" oncommand="ZoteroPane_Local.newCollection(ZoteroPane_Local.getSelectedCollection().id)"/> <menuseparator/> - <menuitem label="&zotero.collections.showUnfiledItems;" oncommand="ZoteroPane.setUnfiled(ZoteroPane.getSelectedLibraryID(), true)"/> - <menuitem oncommand="ZoteroPane.editSelectedCollection();"/> - <menuitem oncommand="ZoteroPane.deleteSelectedCollection();"/> + <menuitem label="&zotero.collections.showUnfiledItems;" oncommand="ZoteroPane_Local.setUnfiled(ZoteroPane_Local.getSelectedLibraryID(), true)"/> + <menuitem oncommand="ZoteroPane_Local.editSelectedCollection();"/> + <menuitem oncommand="ZoteroPane_Local.deleteSelectedCollection();"/> <menuseparator/> <menuitem oncommand="Zotero_File_Interface.exportCollection();"/> <menuitem oncommand="Zotero_File_Interface.bibliographyFromCollection();"/> <menuitem label="&zotero.toolbar.export.label;" oncommand="Zotero_File_Interface.exportFile()"/> <menuitem oncommand="Zotero_Report_Interface.loadCollectionReport()"/> - <menuitem label="&zotero.toolbar.emptyTrash.label;" oncommand="ZoteroPane.emptyTrash();"/> - <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.createCommonsBucket();"/><!--TODO localize --> - <menuitem label="Refresh" oncommand="ZoteroPane.refreshCommonsBucket();"/><!--TODO localize --> + <menuitem label="&zotero.toolbar.emptyTrash.label;" oncommand="ZoteroPane_Local.emptyTrash();"/> + <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane_Local.createCommonsBucket();"/><!--TODO localize --> + <menuitem label="Refresh" oncommand="ZoteroPane_Local.refreshCommonsBucket();"/><!--TODO localize --> </menupopup> - <menupopup id="zotero-itemmenu" onpopupshowing="ZoteroPane.buildItemContextMenu();"> - <menuitem label="&zotero.items.menu.showInLibrary;" oncommand="ZoteroPane.selectItem(this.parentNode.getAttribute('itemID'), true)"/> + <menupopup id="zotero-itemmenu" onpopupshowing="ZoteroPane_Local.buildItemContextMenu();"> + <menuitem label="&zotero.items.menu.showInLibrary;" oncommand="ZoteroPane_Local.selectItem(this.parentNode.getAttribute('itemID'), true)"/> <menuseparator/> - <!-- with icon: <menuitem class="menuitem-iconic" id="zotero-menuitem-note" label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane.newNote(false, this.parentNode.getAttribute('itemID'))"/>--> - <menuitem label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane.newNote(false, this.parentNode.getAttribute('itemID'))"/> + <!-- with icon: <menuitem class="menuitem-iconic" id="zotero-menuitem-note" label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane_Local.newNote(false, this.parentNode.getAttribute('itemID'))"/>--> + <menuitem label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane_Local.newNote(false, this.parentNode.getAttribute('itemID'))"/> <menu label="&zotero.items.menu.attach;"> <menupopup id="zotero-add-attachment-popup"> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-snapshot" label="&zotero.items.menu.attach.snapshot;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane.addAttachmentFromPage(false, itemID)"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-web-link" label="&zotero.items.menu.attach.link;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane.addAttachmentFromPage(true, itemID)"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-file" label="&zotero.items.menu.attach.file;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane.addAttachmentFromDialog(false, itemID);"/> - <menuitem class="menuitem-iconic zotero-menuitem-attachments-link" label="&zotero.items.menu.attach.fileLink;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane.addAttachmentFromDialog(true, itemID);"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-snapshot" label="&zotero.items.menu.attach.snapshot;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane_Local.addAttachmentFromPage(false, itemID)"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-web-link" label="&zotero.items.menu.attach.link;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane_Local.addAttachmentFromPage(true, itemID)"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-file" label="&zotero.items.menu.attach.file;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane_Local.addAttachmentFromDialog(false, itemID);"/> + <menuitem class="menuitem-iconic zotero-menuitem-attachments-link" label="&zotero.items.menu.attach.fileLink;" oncommand="var itemID = parseInt(this.parentNode.parentNode.parentNode.getAttribute('itemID')); ZoteroPane_Local.addAttachmentFromDialog(true, itemID);"/> </menupopup> </menu> <menuseparator/> - <menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane.duplicateSelectedItem();"/> - <menuitem oncommand="ZoteroPane.deleteSelectedItems();"/> - <menuitem oncommand="ZoteroPane.deleteSelectedItems(true);"/> + <menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane_Local.duplicateSelectedItem();"/> + <menuitem oncommand="ZoteroPane_Local.deleteSelectedItems();"/> + <menuitem oncommand="ZoteroPane_Local.deleteSelectedItems(true);"/> <menuseparator/> <menuitem oncommand="Zotero_File_Interface.exportItems();"/> <menuitem oncommand="Zotero_File_Interface.bibliographyFromItems();"/> <menuitem oncommand="Zotero_Report_Interface.loadItemReport()"/> <menuseparator/> - <menuitem oncommand="ZoteroPane.createParentItemsFromSelected();"/> + <menuitem oncommand="ZoteroPane_Local.createParentItemsFromSelected();"/> <menuitem oncommand="Zotero_RecognizePDF.recognizeSelected();"/> - <menuitem oncommand="ZoteroPane.renameSelectedAttachmentsFromParents()"/> - <menuitem oncommand="ZoteroPane.reindexItem();"/> + <menuitem oncommand="ZoteroPane_Local.renameSelectedAttachmentsFromParents()"/> + <menuitem oncommand="ZoteroPane_Local.reindexItem();"/> </menupopup> </popupset> @@ -263,13 +263,13 @@ <!-- This extra vbox prevents the toolbar from getting compressed when resizing the tag selector to max height --> <tree id="zotero-collections-tree" hidecolumnpicker="true" context="zotero-collectionmenu" - onmouseover="ZoteroPane.collectionsView.setHighlightedRows();" - onkeypress="ZoteroPane.handleKeyPress(event, this.id)" - onselect="ZoteroPane.onCollectionSelected();" seltype="cell" - ondragstart="if (event.target.localName == 'treechildren') { ZoteroPane.collectionsView.onDragStart(event); }" - ondragenter="return ZoteroPane.collectionsView.onDragEnter(event)" - ondragover="return ZoteroPane.collectionsView.onDragOver(event)" - ondrop="return ZoteroPane.collectionsView.onDrop(event)" + onmouseover="ZoteroPane_Local.collectionsView.setHighlightedRows();" + onkeypress="ZoteroPane_Local.handleKeyPress(event, this.id)" + onselect="ZoteroPane_Local.onCollectionSelected();" seltype="cell" + ondragstart="if (event.target.localName == 'treechildren') { ZoteroPane_Local.collectionsView.onDragStart(event); }" + ondragenter="return ZoteroPane_Local.collectionsView.onDragEnter(event)" + ondragover="return ZoteroPane_Local.collectionsView.onDragOver(event)" + ondrop="return ZoteroPane_Local.collectionsView.onDrop(event)" flex="1"> <treecols> <treecol @@ -280,16 +280,16 @@ </treecols> <treechildren/> </tree> - <splitter id="zotero-tags-splitter" onmouseup="ZoteroPane.updateTagSelectorSize()" collapse="after"> - <grippy oncommand="ZoteroPane.toggleTagSelector()"/> + <splitter id="zotero-tags-splitter" onmouseup="ZoteroPane_Local.updateTagSelectorSize()" collapse="after"> + <grippy oncommand="ZoteroPane_Local.toggleTagSelector()"/> </splitter> <zoterotagselector id="zotero-tag-selector" zotero-persist="height,collapsed,showAutomatic,filterToScope" - oncommand="ZoteroPane.updateTagFilter()"/> + oncommand="ZoteroPane_Local.updateTagFilter()"/> </vbox> <splitter id="zotero-tree-splitter" resizebefore="closest" resizeafter="closest" collapse="before" - onmousemove="document.getElementById('zotero-items-toolbar').setAttribute('state', this.getAttribute('state'));ZoteroPane.updateToolbarPosition();" - oncommand="ZoteroPane.updateToolbarPosition()"> + onmousemove="document.getElementById('zotero-items-toolbar').setAttribute('state', this.getAttribute('state'));ZoteroPane_Local.updateToolbarPosition();" + oncommand="ZoteroPane_Local.updateToolbarPosition()"> <grippy/> </splitter> @@ -298,14 +298,14 @@ <tree id="zotero-items-tree" context="zotero-itemmenu" enableColumnDrag="true" - onfocus="if (ZoteroPane.itemsView.rowCount &amp;&amp; !ZoteroPane.itemsView.selection.count) { ZoteroPane.itemsView.selection.select(0); }" - onkeypress="ZoteroPane.handleKeyPress(event, this.id)" - onselect="ZoteroPane.itemSelected();" - ondragstart="if (event.target.localName == 'treechildren') { ZoteroPane.itemsView.onDragStart(event); }" - ondragenter="return ZoteroPane.itemsView.onDragEnter(event)" - ondragover="return ZoteroPane.itemsView.onDragOver(event)" - ondragdrop="return ZoteroPane.itemsView.onDrop(event)" - oncommand="ZoteroPane.serializePersist()" + onfocus="if (ZoteroPane_Local.itemsView.rowCount &amp;&amp; !ZoteroPane_Local.itemsView.selection.count) { ZoteroPane_Local.itemsView.selection.select(0); }" + onkeypress="ZoteroPane_Local.handleKeyPress(event, this.id)" + onselect="ZoteroPane_Local.itemSelected();" + ondragstart="if (event.target.localName == 'treechildren') { ZoteroPane_Local.itemsView.onDragStart(event); }" + ondragenter="return ZoteroPane_Local.itemsView.onDragEnter(event)" + ondragover="return ZoteroPane_Local.itemsView.onDragOver(event)" + ondragdrop="return ZoteroPane_Local.itemsView.onDrop(event)" + oncommand="ZoteroPane_Local.serializePersist()" flex="1"> <treecols> <treecol @@ -398,21 +398,21 @@ </vbox> <splitter id="zotero-view-splitter" resizebefore="closest" resizeafter="closest" - onmousemove="ZoteroPane.updateToolbarPosition()" - oncommand="ZoteroPane.updateToolbarPosition()"/> + onmousemove="ZoteroPane_Local.updateToolbarPosition()" + oncommand="ZoteroPane_Local.updateToolbarPosition()"/> <vbox id="zotero-item-pane" zotero-persist="width"> <!-- TODO: localize --> <button id="zotero-item-restore-button" label="Restore to Library" - oncommand="ZoteroPane.restoreSelectedItems()" hidden="true"/> + oncommand="ZoteroPane_Local.restoreSelectedItems()" hidden="true"/> <!-- TODO: localize --> <button id="zotero-item-show-original" label="Show Original" - oncommand="ZoteroPane.showOriginalItem()" hidden="true"/> + oncommand="ZoteroPane_Local.showOriginalItem()" hidden="true"/> <deck id="zotero-item-pane-content" selectedIndex="0" flex="1"> <groupbox pack="center" align="center"> <label id="zotero-view-selected-label"/> </groupbox> - <tabbox id="zotero-view-tabbox" flex="1" onselect="if (!ZoteroPane.collectionsView.selection || event.originalTarget.localName != 'tabpanels') { return; }; ZoteroItemPane.viewItem(ZoteroPane.getSelectedItems()[0], ZoteroPane.collectionsView.editable ? 'edit' : 'view', this.selectedIndex)"> + <tabbox id="zotero-view-tabbox" flex="1" onselect="if (!ZoteroPane_Local.collectionsView.selection || event.originalTarget.localName != 'tabpanels') { return; }; ZoteroItemPane.viewItem(ZoteroPane_Local.getSelectedItems()[0], ZoteroPane_Local.collectionsView.editable ? 'edit' : 'view', this.selectedIndex)"> <tabs> <tab label="&zotero.tabs.info.label;"/> <tab label="&zotero.tabs.notes.label;"/> @@ -424,7 +424,7 @@ <!-- Note info pane --> <groupbox id="zotero-view-note" flex="1"> <zoteronoteeditor id="zotero-note-editor" flex="1" notitle="1"/> - <button id="zotero-view-note-button" label="&zotero.notes.separate;" oncommand="ZoteroPane.openNoteWindow(this.getAttribute('noteID')); if(this.hasAttribute('sourceID')) ZoteroPane.selectItem(this.getAttribute('sourceID'));"/> + <button id="zotero-view-note-button" label="&zotero.notes.separate;" oncommand="ZoteroPane_Local.openNoteWindow(this.getAttribute('noteID')); if(this.hasAttribute('sourceID')) ZoteroPane_Local.selectItem(this.getAttribute('sourceID'));"/> </groupbox> <!-- Attachment info pane --> <groupbox flex="1">