zotero/chrome/content/zotero/overlay.xul

494 lines
No EOL
26 KiB
XML

<?xml version="1.0"?>
<!--
***** BEGIN LICENSE BLOCK *****
Copyright (c) 2006 Center for History and New Media
George Mason University, Fairfax, Virginia, USA
http://chnm.gmu.edu
Licensed under the Educational Community License, Version 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
***** END LICENSE BLOCK *****
-->
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
<!DOCTYPE overlay [
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
]>
<overlay id="zotero"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Include the global XPCOM object -->
<script src="include.js"/>
<script src="overlay.js"/>
<script src="fileInterface.js"/>
<script src="reportInterface.js"/>
<script src="timelineInterface.js"/>
<script src="recognizePDF.js"/>
<script src="browser.js"/>
<commandset id="mainCommandSet">
<command id="cmd_zotero_search" oncommand="ZoteroPane.search();"/>
<command id="cmd_zotero_reportErrors" oncommand="ZoteroPane.reportErrors();"/>
</commandset>
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="scholar-toolbar-button"/> <!-- May be necessary to keep pre-1.0b2 installs from breaking -->
<toolbarbutton id="zotero-toolbar-button" class="toolbarbutton-1"
label="Zotero"
oncommand="ZoteroPane.toggleDisplay();"/>
</toolbarpalette>
<popup id="contentAreaContextMenu">
<menuseparator id="zotero-context-separator" hidden="true"/>
<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(); ZoteroPane.addTextToNote(str)"/>
<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 itemID = ZoteroPane.addItemFromPage(); ZoteroPane.newNote(false, itemID, str)"/>
<!-- TODO: localize and remove zotero.contextMenu.saveLinkAsItem/saveImageAsSnapshot -->
<menuitem id="zotero-context-save-link-as-item" class="menu-iconic"
label="Save Link as Zotero Item" hidden="true"
oncommand="ZoteroPane.addItemFromURL(window.gContextMenu.linkURL)"/>
<menuitem id="zotero-context-save-image-as-item" class="menu-iconic"
label="Save Image as Zotero Item" hidden="true"
oncommand="ZoteroPane.addItemFromURL(window.gContextMenu.onImage ? (window.gContextMenu.mediaURL ? window.gContextMenu.mediaURL : window.gContextMenu.imageURL) : window.gContextMenu.bgImageURL, 'artwork')"/>
</popup>
<vbox id="appcontent">
<!-- Changes to attributes of zotero-splitter and zotero-pane must be mirrored on overlay.js's onLoad() function -->
<!-- onmouseup shouldn't be necessary but seems to help prevent tag selector from sometimes going off the screen -->
<splitter id="zotero-splitter" resizebefore="closest" resizeafter="closest" hidden="true"
onmouseup="ZoteroPane.updateTagSelectorSize()"/>
<hbox id="zotero-pane" persist="savedHeight" hidden="true"
onkeydown="ZoteroPane.handleKeyDown(event, this.id)"
onkeyup="ZoteroPane.handleKeyUp(event, this.id)"
chromedir="&locale.dir;">
<popupset>
<popup 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)"/>
<menuseparator/>
<menuitem oncommand="ZoteroPane.editSelectedCollection();"/>
<menuitem oncommand="ZoteroPane.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();"/>
</popup>
<popup id="zotero-itemmenu" onpopupshowing="ZoteroPane.buildItemContextMenu();">
<menuitem label="&zotero.items.menu.showInLibrary;" oncommand="ZoteroPane.selectItem(this.parentNode.getAttribute('itemID'), true)"/>
<menuseparator/>
<menuitem label="&zotero.items.menu.attach.note;" oncommand="ZoteroPane.newNote(false, this.parentNode.getAttribute('itemID'))"/>
<menuitem label="&zotero.items.menu.attach.snapshot;" oncommand="ZoteroPane.addAttachmentFromPage(false, parseInt(this.parentNode.getAttribute('itemID')))"/>
<menuitem label="&zotero.items.menu.attach.link;" oncommand="ZoteroPane.addAttachmentFromPage(true, parseInt(this.parentNode.getAttribute('itemID')))"/>
<menuseparator/>
<menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane.duplicateSelectedItem();"/>
<menuitem oncommand="ZoteroPane.deleteSelectedItems();"/>
<menuitem oncommand="ZoteroPane.deleteSelectedItems(true);"/>
<menuseparator/>
<menuitem oncommand="Zotero_File_Interface.exportItems();"/>
<menuitem oncommand="Zotero_File_Interface.bibliographyFromItems();"/>
<menuitem oncommand="Zotero_Report_Interface.loadItemReport()"/>
<menuseparator/>
<menuitem oncommand="Zotero_RecognizePDF.recognizeSelected();"/>
<menuitem oncommand="ZoteroPane.reindexItem();"/>
</popup>
</popupset>
<vbox id="zotero-collections-pane" persist="width" flex="1">
<!-- This extra vbox prevents the toolbar from getting compressed when resizing
the tag selector to max height -->
<vbox flex="1">
<hbox class="toolbar">
<toolbarbutton id="zotero-tb-collection-add" tooltiptext="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.newCollection()"/>
<toolbarbutton id="zotero-tb-group-add" tooltiptext="&zotero.toolbar.newGroup;" oncommand="ZoteroPane.newGroup()"/>
<spacer flex="1"/>
<toolbarbutton id="zotero-tb-tag-selector" tooltiptext="&zotero.toolbar.tagSelector.label;" oncommand="ZoteroPane.toggleTagSelector()"/>
<toolbarbutton id="zotero-tb-actions-menu" 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)">
<menuitem id="zotero-tb-actions-import" label="&zotero.toolbar.import.label;" oncommand="Zotero_File_Interface.importFile();"/>
<menuitem id="zotero-tb-actions-import-clipboard" label="&zotero.toolbar.importFromClipboard;" oncommand="Zotero_File_Interface.importFromClipboard();" />
<menuitem id="zotero-tb-actions-export" label="&zotero.toolbar.export.label;" oncommand="Zotero_File_Interface.exportFile();"/>
<menuitem id="zotero-tb-actions-rtfScan" label="&zotero.toolbar.rtfScan.label;" oncommand="window.openDialog('chrome://zotero/content/rtfScan.xul', 'rtfScan', 'chrome,centerscreen')"/>
<menuitem hidden="true" id="zotero-tb-actions-zeroconf-update"
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"/>
<menuseparator id="zotero-tb-actions-sync-separator"/>
<menuitem hidden="true" label="Sync Debugging" disabled="true"/>
<menuitem hidden="true" label=" Clear Server Data" oncommand="Zotero.Sync.Server.clear()"/>
<menuitem hidden="true" label=" Reset Server Lock" oncommand="Zotero.Sync.Server.resetServer()"/>
<menuitem hidden="true" label=" Reset Client" oncommand="Zotero.Sync.Server.resetClient()"/>
<menuitem label="Storage Debugging" disabled="true"/>
<menuitem label=" Reset Storage History" oncommand="Zotero.Sync.Storage.resetAllSyncStates()"/>
<menuitem label=" Purge Deleted Storage Files" oncommand="Zotero.Sync.Storage.purgeDeletedStorageFiles(function(results) { Zotero.debug(results); })"/>
<menuitem label=" Purge Orphaned Storage Files" oncommand="Zotero.Sync.Storage.purgeOrphanedStorageFiles(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()"/>
<menuitem id="zotero-tb-actions-reportErrors" command="cmd_zotero_reportErrors" disabled="true"/>
<menuitem id="zotero-tb-actions-documentation" label="&zotero.toolbar.documentation.label;" oncommand="window.open('http://www.zotero.org/documentation/', '', 'menubar=yes,location=yes,toolbar=yes,personalbar=yes,resizable=yes,scrollbars=yes,status=yes');"/>
<menuitem id="zotero-tb-actions-about" label="&zotero.toolbar.about.label;" oncommand="window.openDialog('chrome://zotero/content/about.xul', 'about', 'chrome')"/>
</menupopup>
</toolbarbutton>
</hbox>
<tree id="zotero-collections-tree" hidecolumnpicker="true" context="zotero-collectionmenu"
onmouseover="ZoteroPane.collectionsView.setHighlightedRows();"
ondblclick="ZoteroPane.onDoubleClick(event, this);"
onkeypress="ZoteroPane.handleKeyPress(event, this.id)"
onselect="ZoteroPane.onCollectionSelected();" seltype="cell"
ondraggesture="if (event.target.localName == 'treechildren') { ZoteroPane.startDrag(event, ZoteroPane.collectionsView); }"
ondragenter="return ZoteroPane.dragEnter(event, ZoteroPane.collectionsView)"
ondragover="return ZoteroPane.dragOver(event, ZoteroPane.collectionsView)"
ondragdrop="return ZoteroPane.dragDrop(event, ZoteroPane.collectionsView)"
flex="1">
<treecols>
<treecol
id="zotero-collections-name-column"
label="&zotero.collections.name_column;"
flex="1"
primary="true"/>
</treecols>
<treechildren/>
</tree>
</vbox>
<splitter id="zotero-tags-splitter" persist="collapsed" onmouseup="ZoteroPane.updateTagSelectorSize()"/>
<zoterotagselector id="zotero-tag-selector" persist="height,collapsed,showAutomatic,filterToScope"
oncommand="ZoteroPane.updateTagFilter()"/>
</vbox>
<splitter id="zotero-tree-splitter" resizebefore="closest" resizeafter="closest"/>
<vbox id="zotero-items-pane" persist="width" flex="1">
<hbox class="toolbar" align="center">
<toolbarbutton id="zotero-tb-add" tooltiptext="&zotero.toolbar.newItem.label;" type="menu">
<!-- 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=""/>
<menuseparator/>
<menu label="&zotero.toolbar.moreItemTypes.label;" tooltiptext="">
<menupopup id="zotero-tb-add-more"/>
</menu>
</menupopup>
</toolbarbutton>
<toolbarbutton id="zotero-tb-item-from-page" tooltiptext="&zotero.toolbar.newItemFromPage.label;" oncommand="ZoteroPane.addItemFromPage('temporaryPDFHack', event.shiftKey ? !Zotero.Prefs.get('automaticSnapshots') : null)"/>
<toolbarbutton id="zotero-tb-lookup" tooltiptext="&zotero.toolbar.lookup.label;" oncommand="ZoteroPane.openLookupWindow()"/>
<!--
<toolbarseparator/>
<toolbarbutton id="zotero-tb-link-page" tooltiptext="&zotero.toolbar.attachment.weblink;" oncommand="ZoteroPane.addAttachmentFromPage(true)"/>
<toolbarbutton id="zotero-tb-snapshot-page" tooltiptext="&zotero.toolbar.attachment.snapshot;" oncommand="ZoteroPane.addAttachmentFromPage()"/>
-->
<toolbarbutton id="zotero-tb-note-add" tooltiptext="&zotero.toolbar.note.standalone;" oncommand="ZoteroPane.newNote(event.shiftKey);"/>
<toolbarseparator/>
<toolbarbutton id="zotero-tb-advanced-search" tooltiptext="&zotero.toolbar.advancedSearch;" oncommand="ZoteroPane.openAdvancedSearchWindow()"/>
<spacer flex="1"/>
<label value="&zotero.toolbar.search.label;" control="zotero-tb-search"/>
<textbox id="zotero-tb-search" type="conditional-timed" timeout="250" command="cmd_zotero_search" dir="reverse"
onkeypress="ZoteroPane.handleSearchKeypress(this, event)"
oninput="ZoteroPane.handleSearchInput(this, event)"
testcode="me.value.indexOf('&quot;') == -1"
prefire="ZoteroPane.clearItemsPaneMessage()"
ontestfail="ZoteroPane.setItemsPaneMessage(Zotero.getString('advancedSearchMode'))">
<toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
</textbox>
</hbox>
<deck id="zotero-items-pane-content" selectedIndex="0" flex="1">
<tree
id="zotero-items-tree" context="zotero-itemmenu"
ondblclick="ZoteroPane.onDoubleClick(event, this);"
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();"
ondraggesture="if (event.target.localName == 'treechildren') { ZoteroPane.startDrag(event, ZoteroPane.itemsView); }"
ondragenter="return ZoteroPane.dragEnter(event, ZoteroPane.itemsView)"
ondragover="return ZoteroPane.dragOver(event, ZoteroPane.itemsView)"
ondragdrop="return ZoteroPane.dragDrop(event, ZoteroPane.itemsView)"
flex="1">
<treecols>
<treecol
id="zotero-items-column-title" primary="true"
label="&zotero.items.title_column;"
flex="4" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-firstCreator"
label="&zotero.items.creator_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-type" hidden="true"
label="&zotero.items.type_column;"
width="40" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-date" hidden="true"
label="&zotero.items.date_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-year" hidden="true"
label="&zotero.items.year_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-publisher" hidden="true"
label="&zotero.items.publisher_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-publicationTitle" hidden="true"
label="&zotero.items.publication_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-journalAbbreviation" hidden="true"
label="&zotero.items.journalAbbr_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-language" hidden="true"
label="&zotero.items.language_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-accessDate" hidden="true"
label="&zotero.items.accessDate_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-callNumber" hidden="true"
label="&zotero.items.callNumber_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-repository" hidden="true"
label="&zotero.items.repository_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-rights" hidden="true"
label="&zotero.items.rights_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-dateAdded" hidden="true"
label="&zotero.items.dateAdded_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-dateModified" hidden="true"
label="&zotero.items.dateModified_column;"
flex="1" persist="width ordinal hidden sortActive sortDirection"/>
<splitter class="tree-splitter"/>
<treecol
id="zotero-items-column-numChildren"
label="&zotero.items.numChildren_column;"
persist="width ordinal hidden sortActive sortDirection"/>
</treecols>
<treechildren/>
</tree>
<!-- Label for displaying messages when items pane is hidden
(e.g. "Advanced search mode — press Enter to search.")-->
<vbox id="zotero-items-pane-message-box" pack="center" align="center"/>
</deck>
</vbox>
<splitter id="zotero-view-splitter" resizebefore="closest" resizeafter="closest"/>
<vbox id="zotero-item-pane" persist="width">
<hbox class="toolbar" align="center" pack="end">
<hbox id="zotero-tb-sync-progress-box" hidden="true" align="center">
<toolbarbutton id="zotero-tb-sync-storage-cancel"
tooltiptext="Cancel Storage Sync"
oncommand="Zotero.Sync.Storage.QueueManager.cancel()"/>
<progressmeter id="zotero-tb-sync-progress" mode="determined"
value="0" tooltip="zotero-tb-sync-progress-tooltip">
</progressmeter>
<tooltip id="zotero-tb-sync-progress-tooltip" noautohide="true">
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<label value="&zotero.sync.storage.progress;"/>
<label id="zotero-tb-sync-progress-tooltip-progress"/>
</row>
<row>
<label value="&zotero.sync.storage.downloads;"/>
<label
id="zotero-tb-sync-progress-tooltip-downloads"/>
</row>
<row>
<label value="&zotero.sync.storage.uploads;"/>
<label
id="zotero-tb-sync-progress-tooltip-uploads"/>
</row>
</rows>
</grid>
</tooltip>
</hbox>
<toolbarbutton id="zotero-tb-sync" class="zotero-small-progress-indicator" tooltip="_child"
oncommand="Zotero.Sync.Runner.sync()">
<tooltip
onpopupshowing="ZoteroPane.setLastSyncStatus(this)"
noautohide="true">
<!-- TODO: localize -->
<label value="Sync with Zotero Server"/>
<label id="zotero-last-sync-time"/>
</tooltip>
</toolbarbutton>
<toolbarseparator/>
<toolbarbutton id="zotero-tb-fullscreen" tooltiptext="&zotero.toolbar.fullscreen.tooltip;" oncommand="ZoteroPane.fullScreen();"/>
<toolbarbutton class="tabs-closebutton" oncommand="ZoteroPane.toggleDisplay()"/>
</hbox>
<!-- TODO: localize -->
<button id="zotero-item-restore-button" label="Restore to Library"
oncommand="ZoteroPane.restoreSelectedItems()" hidden="true"/>
<groupbox flex="1">
<caption>
<tabs id="zotero-view-tabs" onselect="document.getElementById('zotero-view-item').selectedIndex = this.selectedIndex;" hidden="true">
<tab label="&zotero.tabs.info.label;"/>
<tab label="&zotero.tabs.notes.label;"/>
<tab label="&zotero.tabs.attachments.label;"/>
<tab label="&zotero.tabs.tags.label;"/>
<tab label="&zotero.tabs.related.label;"/>
</tabs>
</caption>
<deck id="zotero-item-pane-content" selectedIndex="0" flex="1">
<box pack="center" align="center">
<label id="zotero-view-selected-label"/>
</box>
<deck id="zotero-view-item" flex="1"/>
<!-- Note info pane -->
<vbox id="zotero-view-note" flex="1">
<zoteronoteeditor id="zotero-note-editor" flex="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'));"/>
</vbox>
<!-- Attachment info pane -->
<zoteroattachmentbox id="zotero-attachment-box" flex="1"/>
</deck>
</groupbox>
</vbox>
</hbox>
<!-- Annotation Toolbar -->
<toolbar id="zotero-annotate-tb" crop="end" insertbefore="content" hidden="true">
<toolbarbutton id="zotero-annotate-tb-add" tooltiptext="&zotero.annotate.toolbar.add.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
<toolbarbutton id="zotero-annotate-tb-collapse" tooltiptext="&zotero.annotate.toolbar.collapse.label;" oncommand="Zotero_Browser.toggleCollapsed();"/>
<toolbarseparator/>
<toolbarbutton id="zotero-annotate-tb-highlight" tooltiptext="&zotero.annotate.toolbar.highlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
<toolbarbutton id="zotero-annotate-tb-unhighlight" tooltiptext="&zotero.annotate.toolbar.unhighlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
</toolbar>
</vbox>
<!-- Scrape Code -->
<hbox id="urlbar-icons">
<image src="chrome://zotero/skin/treeitem-book.png" id="zotero-status-image" onclick="Zotero_Browser.scrapeThisPage(ZoteroPane.getSelectedLibraryID(), ZoteroPane.getSelectedCollection(true))" position="1" hidden="true"/>
</hbox>
<statusbar id="status-bar">
<statusbarpanel id="zotero-status-bar-icon" hidden="true"
class="statusbarpanel-iconic" onclick="ZoteroPane.toggleDisplay();"/>
</statusbar>
<script>
<![CDATA[
window.addEventListener('load', function(e){
var icon = document.getElementById('zotero-status-bar-icon');
if (Zotero && Zotero.initialized){
switch (Zotero.Prefs.get('statusBarIcon')) {
case 2:
icon.setAttribute('hidden', false);
break;
case 1:
icon.setAttribute('hidden', false);
icon.setAttribute('compact', true);
break;
}
// Set "Report Errors..." label via property rather than DTD entity,
// since we need to reference it in script elsewhere
document.getElementById('zotero-tb-actions-reportErrors').setAttribute('label',
Zotero.getString('errorReport.reportErrors'));
// Used for loading the changelog after upgrades
if (Zotero.initialURL) {
setTimeout("gBrowser.selectedTab = gBrowser.addTab(Zotero.initialURL); Zotero.initialURL = null;", 1);
}
}
else {
if (Zotero) {
var errMsg = Zotero.startupError;
}
// Use defaults if necessary
if (!errMsg) {
// Get the stringbundle manually
var src = 'chrome://zotero/locale/zotero.properties';
var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1'].
getService(Components.interfaces.nsILocaleService);
var appLocale = localeService.getApplicationLocale();
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService);
var stringBundle = stringBundleService.createBundle(src, appLocale);
var errMsg = stringBundle.GetStringFromName('startupError');
}
icon.setAttribute('tooltiptext', errMsg);
icon.setAttribute('error', 'true');
icon.setAttribute('hidden', false);
}
}, false);
document.getElementById('appcontent').addEventListener('keydown', ZoteroPane.handleKeyDown, true);
// Make sure open progress windows are fading
document.getElementById('appcontent').addEventListener('mousemove', Zotero.ProgressWindowSet.updateTimers, false);
]]>
</script>
<menupopup id="menu_ToolsPopup">
<menuseparator id="zoteroSeparator" insertbefore="devToolsSeparator"/>
<menuitem id="tools-zotero" insertbefore="devToolsSeparator"
oncommand="ZoteroPane.toggleDisplay();" label="Zotero"
key="key_openZotero"/>
</menupopup>
<keyset id="mainKeyset">
<!--
The key can be changed by the pref extensions.zotero.keys.openZotero,
but if the values are changed here, the pref won't override them.
-->
<key id="key_openZotero"
key="Z"
oncommand="ZoteroPane.toggleDisplay();"
modifiers="accel alt" />
</keyset>
</overlay>