commit fd9e25fa29374000e2aa23af1f96569438381190
parent 9312300420878e13d46694ca5461114f76dacbeb
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 13 Feb 2011 03:51:24 +0000
- Put all Zotero buttons in one contiguous toolbar. This seems to be the only way to get a unified window on OS X. It also means that if the window is too small, the search box pushes over the metadata pane buttons, instead of getting truncated.
- Firefox 3.6 fixes
Diffstat:
6 files changed, 280 insertions(+), 264 deletions(-)
diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css
@@ -12,14 +12,6 @@
background-image: none;
}
-#zotero-pane .toolbar {
- /* This will be ignored on FF <3.5 */
- -moz-appearance: -moz-mac-unified-toolbar;
- /* This will be ignored on FF >=3.5 */
- background: url("chrome://zotero/skin/mac/toolbar-background.png") left center repeat-x;
- margin-left: -1px;
-}
-
#zotero-items-toolbar[state=collapsed]
{
margin-left: -8px !important;
diff --git a/chrome/content/zotero-platform/mac/tab.css b/chrome/content/zotero-platform/mac/tab.css
@@ -1,4 +1,4 @@
-#zotero-pane .toolbar {
+#zotero-toolbar {
-moz-appearance: none !important;
- background-color: -moz-mac-chrome-active !important;
+ background: url("chrome://zotero/skin/mac/toolbar-background.png") left center repeat-x;
}
\ No newline at end of file
diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml
@@ -803,13 +803,13 @@
// appropriately truncate lastName
// get item box width
- var computedStyle = window.getComputedStyle(this);
+ var computedStyle = window.getComputedStyle(this, null);
var boxWidth = computedStyle.getPropertyValue('width');
// get field label width
- var computedStyle = window.getComputedStyle(row.firstChild);
+ var computedStyle = window.getComputedStyle(row.firstChild, null);
var leftHboxWidth = computedStyle.getPropertyValue('width');
// get last name width
- computedStyle = window.getComputedStyle(lastName);
+ computedStyle = window.getComputedStyle(lastName, null);
var lastNameWidth = computedStyle.getPropertyValue('width');
if(boxWidth.substr(-2) === 'px'
&& leftHboxWidth.substr(-2) === 'px'
diff --git a/chrome/content/zotero/standalone.xul b/chrome/content/zotero/standalone.xul
@@ -212,7 +212,6 @@
context="toolbar-context-menu"
defaultset="personal-bookmarks"
customizable="true"/>-->
-
<hbox flex="1" id="browser">
<vbox id="appcontent" flex="1">
<stack id="zotero-pane-stack" fullscreenmode="true" flex="1"/>
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -115,7 +115,9 @@ var ZoteroPane = new function()
_loaded = true;
var zp = document.getElementById('zotero-pane');
- Zotero.setFontSize(zp)
+ Zotero.setFontSize(zp);
+ ZoteroPane.updateToolbarPosition();
+ window.addEventListener("resize", this.updateToolbarPosition, false);
if (Zotero.isMac) {
//document.getElementById('zotero-tb-actions-zeroconf-update').setAttribute('hidden', false);
@@ -3481,4 +3483,18 @@ var ZoteroPane = new function()
}
Zotero.Prefs.set("pane.persist", JSON.stringify(serializedValues));
}
+
+ /**
+ * Moves around the toolbar when the user moves around the pane
+ */
+ this.updateToolbarPosition = function() {
+ const PANES = ["collections", "items"];
+ for each(var paneName in PANES) {
+ var pane = document.getElementById("zotero-"+paneName+"-pane");
+ var toolbar = document.getElementById("zotero-"+paneName+"-toolbar");
+
+ computedStyle = window.getComputedStyle(pane, null);
+ toolbar.style.width = computedStyle.getPropertyValue("width");
+ }
+ }
}
\ No newline at end of file
diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul
@@ -76,122 +76,43 @@
<checkbox/>
</box>
- <hbox id="zotero-pane"
+ <vbox id="zotero-pane"
onkeydown="ZoteroPane.handleKeyDown(event, this.id)"
onkeyup="ZoteroPane.handleKeyUp(event, this.id)"
chromedir="&locale.dir;">
- <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)"/>
- <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();"/>
- <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.createCommonsBucket();"/><!--TODO localize -->
- <menuitem label="Refresh" oncommand="ZoteroPane.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)"/>
- <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'))"/>
- <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);"/>
- </menupopup>
- </menu>
- <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="ZoteroPane.createParentItemsFromSelected();"/>
- <menuitem oncommand="Zotero_RecognizePDF.recognizeSelected();"/>
- <menuitem oncommand="ZoteroPane.renameSelectedAttachmentsFromParents()"/>
- <menuitem oncommand="ZoteroPane.reindexItem();"/>
- </menupopup>
- </popupset>
- <vbox id="zotero-collections-pane" zotero-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" 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()"/>
- <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)">
- <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 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()"/>
- <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')"/>
- </menupopup>
- </toolbarbutton>
- </hbox>
- <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)"
- flex="1">
- <treecols>
- <treecol
- id="zotero-collections-name-column"
- flex="1"
- primary="true"
- hideheader="true"/>
- </treecols>
- <treechildren/>
- </tree>
- </vbox>
- <splitter id="zotero-tags-splitter" onmouseup="ZoteroPane.updateTagSelectorSize()" collapse="after">
- <grippy oncommand="ZoteroPane.toggleTagSelector()"/>
- </splitter>
- <zoterotagselector id="zotero-tag-selector" zotero-persist="height,collapsed,showAutomatic,filterToScope"
- oncommand="ZoteroPane.updateTagFilter()"/>
- </vbox>
-
- <splitter id="zotero-tree-splitter" resizebefore="closest" resizeafter="closest" collapse="before"
- onmousemove="document.getElementById('zotero-items-toolbar').setAttribute('state', this.getAttribute('state'));">
- <grippy/>
- </splitter>
-
- <vbox id="zotero-items-pane" zotero-persist="width" flex="1">
- <hbox class="toolbar" id="zotero-items-toolbar" align="center">
+ <toolbar id="zotero-toolbar" class="toolbar">
+ <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()"/>
+ <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)">
+ <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 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()"/>
+ <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')"/>
+ </menupopup>
+ </toolbarbutton>
+ </hbox>
+
+ <hbox id="zotero-items-toolbar" align="center">
<toolbarbutton id="zotero-tb-add" class="zotero-tb-button" tooltiptext="&zotero.toolbar.newItem.label;" type="menu">
<!-- New Item drop-down built in overlay.js::onLoad() -->
<menupopup>
@@ -230,112 +151,7 @@
</textbox>
</hbox>
- <deck id="zotero-items-pane-content" selectedIndex="0" flex="1">
- <tree
- id="zotero-items-tree" context="zotero-itemmenu"
- enableColumnDrag="true"
- onfocus="if (ZoteroPane.itemsView.rowCount && !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)"
- flex="1">
- <treecols>
- <treecol
- id="zotero-items-column-title" primary="true"
- label="&zotero.items.title_column;"
- flex="4" zotero-persist="width ordinal hidden sortActive sortDirection"/>
- <splitter class="tree-splitter"/>
- <treecol
- id="zotero-items-column-firstCreator"
- label="&zotero.items.creator_column;"
- flex="1" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-persist="width ordinal hidden sortActive sortDirection"/>
- <splitter class="tree-splitter"/>
- <treecol
- id="zotero-items-column-libraryCatalog" hidden="true"
- label="&zotero.items.libraryCatalog_column;"
- flex="1" zotero-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" zotero-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" zotero-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" zotero-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" zotero-persist="width ordinal hidden sortActive sortDirection"/>
- <splitter class="tree-splitter"/>
- <treecol
- id="zotero-items-column-numChildren"
- label="&zotero.items.numChildren_column;"
- zotero-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" zotero-persist="width">
- <hbox class="toolbar" align="center">
+ <hbox id="zotero-item-toolbar" align="center" flex="1">
<hbox align="center" pack="start" flex="1">
<toolbarbutton id="zotero-tb-locate" class="zotero-tb-button" tooltiptext="&zotero.toolbar.openURL.label;" type="menu">
<menupopup id="zotero-tb-locate-menu" onpopupshowing="Zotero_LocateMenu.buildLocateMenu()"/>
@@ -392,37 +208,230 @@
<toolbarbutton id="zotero-tb-fullscreen" tooltiptext="&zotero.toolbar.tab.tooltip;" oncommand="ZoteroPane.toggleTab();" class="zotero-tb-button"/>
<toolbarbutton id="zotero-close-button" class="tabs-closebutton" oncommand="ZoteroOverlay.toggleDisplay()"/>
</hbox>
- <!-- TODO: localize -->
- <button id="zotero-item-restore-button" label="Restore to Library"
- oncommand="ZoteroPane.restoreSelectedItems()" hidden="true"/>
- <!-- TODO: localize -->
- <button id="zotero-item-show-original" label="Show Original"
- oncommand="ZoteroPane.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)">
- <tabs>
- <tab label="&zotero.tabs.info.label;"/>
- <tab label="&zotero.tabs.notes.label;"/>
- <tab label="&zotero.tabs.tags.label;"/>
- <tab label="&zotero.tabs.related.label;"/>
- </tabs>
- <tabpanels id="zotero-view-item" flex="1"/>
- </tabbox>
- <!-- Note info pane -->
- <groupbox 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'));"/>
- </groupbox>
- <!-- Attachment info pane -->
- <groupbox flex="1">
- <zoteroattachmentbox id="zotero-attachment-box" flex="1"/>
- </groupbox>
- </deck>
- </vbox>
- </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)"/>
+ <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();"/>
+ <menuitem label="&zotero.toolbar.newCollection.label;" oncommand="ZoteroPane.createCommonsBucket();"/><!--TODO localize -->
+ <menuitem label="Refresh" oncommand="ZoteroPane.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)"/>
+ <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'))"/>
+ <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);"/>
+ </menupopup>
+ </menu>
+ <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="ZoteroPane.createParentItemsFromSelected();"/>
+ <menuitem oncommand="Zotero_RecognizePDF.recognizeSelected();"/>
+ <menuitem oncommand="ZoteroPane.renameSelectedAttachmentsFromParents()"/>
+ <menuitem oncommand="ZoteroPane.reindexItem();"/>
+ </menupopup>
+ </popupset>
+
+
+ <hbox id="zotero-trees" flex="1">
+ <vbox id="zotero-collections-pane" zotero-persist="width" flex="1">
+ <!-- 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)"
+ flex="1">
+ <treecols>
+ <treecol
+ id="zotero-collections-name-column"
+ flex="1"
+ primary="true"
+ hideheader="true"/>
+ </treecols>
+ <treechildren/>
+ </tree>
+ <splitter id="zotero-tags-splitter" onmouseup="ZoteroPane.updateTagSelectorSize()" collapse="after">
+ <grippy oncommand="ZoteroPane.toggleTagSelector()"/>
+ </splitter>
+ <zoterotagselector id="zotero-tag-selector" zotero-persist="height,collapsed,showAutomatic,filterToScope"
+ oncommand="ZoteroPane.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()">
+ <grippy/>
+ </splitter>
+
+ <vbox id="zotero-items-pane" zotero-persist="width" flex="1">
+ <deck id="zotero-items-pane-content" selectedIndex="0" flex="1">
+ <tree
+ id="zotero-items-tree" context="zotero-itemmenu"
+ enableColumnDrag="true"
+ onfocus="if (ZoteroPane.itemsView.rowCount && !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)"
+ flex="1">
+ <treecols>
+ <treecol
+ id="zotero-items-column-title" primary="true"
+ label="&zotero.items.title_column;"
+ flex="4" zotero-persist="width ordinal hidden sortActive sortDirection"/>
+ <splitter class="tree-splitter"/>
+ <treecol
+ id="zotero-items-column-firstCreator"
+ label="&zotero.items.creator_column;"
+ flex="1" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-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" zotero-persist="width ordinal hidden sortActive sortDirection"/>
+ <splitter class="tree-splitter"/>
+ <treecol
+ id="zotero-items-column-libraryCatalog" hidden="true"
+ label="&zotero.items.libraryCatalog_column;"
+ flex="1" zotero-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" zotero-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" zotero-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" zotero-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" zotero-persist="width ordinal hidden sortActive sortDirection"/>
+ <splitter class="tree-splitter"/>
+ <treecol
+ id="zotero-items-column-numChildren"
+ label="&zotero.items.numChildren_column;"
+ zotero-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"
+ onmousemove="ZoteroPane.updateToolbarPosition()"
+ oncommand="ZoteroPane.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"/>
+ <!-- TODO: localize -->
+ <button id="zotero-item-show-original" label="Show Original"
+ oncommand="ZoteroPane.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)">
+ <tabs>
+ <tab label="&zotero.tabs.info.label;"/>
+ <tab label="&zotero.tabs.notes.label;"/>
+ <tab label="&zotero.tabs.tags.label;"/>
+ <tab label="&zotero.tabs.related.label;"/>
+ </tabs>
+ <tabpanels id="zotero-view-item" flex="1"/>
+ </tabbox>
+ <!-- Note info pane -->
+ <groupbox 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'));"/>
+ </groupbox>
+ <!-- Attachment info pane -->
+ <groupbox flex="1">
+ <zoteroattachmentbox id="zotero-attachment-box" flex="1"/>
+ </groupbox>
+ </deck>
+ </vbox>
+ </hbox>
+ </vbox>
<!-- Barrier to prevent tabbing into Zotero pane when busy -->
<box id="zotero-pane-tab-catcher-bottom" hidden="true" align="center" pack="center" style="opacity: 0">