diff --git a/chrome.manifest b/chrome.manifest index 31d355a812..de1612c43d 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -1,8 +1,42 @@ content zotero chrome/content/zotero/ + locale zotero en-US chrome/locale/en-US/zotero/ -skin zotero default chrome/skin/default/zotero/ +locale zotero af-ZA chrome/locale/af-ZA/zotero/ +locale zotero ar chrome/locale/ar/zotero/ +locale zotero bg-BG chrome/locale/bg-BG/zotero/ +locale zotero ca-AD chrome/locale/ca-AD/zotero/ +locale zotero da-DK chrome/locale/da-DK/zotero/ +locale zotero de-AT chrome/locale/de-AT/zotero/ +locale zotero de-CH chrome/locale/de-CH/zotero/ +locale zotero de-DE chrome/locale/de-DE/zotero/ +locale zotero el-GR chrome/locale/el-GR/zotero/ +locale zotero es-ES chrome/locale/es-ES/zotero/ +locale zotero et-EE chrome/locale/et-EE/zotero/ +locale zotero fr-FR chrome/locale/fr-FR/zotero/ +locale zotero he-IL chrome/locale/he-IL/zotero/ +locale zotero hu-HU chrome/locale/hu-HU/zotero/ +locale zotero is-IS chrome/locale/is-IS/zotero/ +locale zotero it-IT chrome/locale/it-IT/zotero/ +locale zotero ja-JP chrome/locale/ja-JP/zotero/ +locale zotero ko-KR chrome/locale/ko-KR/zotero/ +locale zotero mn-MN chrome/locale/mn-MN/zotero/ +locale zotero nb-NO chrome/locale/nb-NO/zotero/ +locale zotero nl-NL chrome/locale/nl-NL/zotero/ +locale zotero pl-PL chrome/locale/pl-PL/zotero/ +locale zotero pt-BR chrome/locale/pt-BR/zotero/ +locale zotero pt-PT chrome/locale/pt-PT/zotero/ +locale zotero ro-RO chrome/locale/ro-RO/zotero/ +locale zotero ru-RU chrome/locale/ru-RU/zotero/ +locale zotero sr-YU chrome/locale/sr-YU/zotero/ +locale zotero sv-SE chrome/locale/sv-SE/zotero/ +locale zotero tr-TR chrome/locale/tr-TR/zotero/ +locale zotero zh-CN chrome/locale/zh-CN/zotero/ +locale zotero zh-TW chrome/locale/zh-TW/zotero/ + +skin zotero default chrome/skin/default/zotero/ overlay chrome://browser/content/browser.xul chrome://zotero/content/overlay.xul -overlay chrome://browser/content/browser.xul chrome://zotero/content/ingester/browser.xul style chrome://browser/content/browser.xul chrome://zotero/skin/zotero.css -style chrome://global/content/customizeToolbar.xul chrome://zotero/skin/zotero.css \ No newline at end of file +style chrome://global/content/customizeToolbar.xul chrome://zotero/skin/zotero.css + +content zotero-platform chrome/content/zotero-platform/ platform diff --git a/chrome/content/zotero-platform/mac/itemPane.css b/chrome/content/zotero-platform/mac/itemPane.css new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/chrome/content/zotero-platform/mac/itemPane.css @@ -0,0 +1 @@ + diff --git a/chrome/content/zotero-platform/unix/itemPane.css b/chrome/content/zotero-platform/unix/itemPane.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/chrome/content/zotero-platform/win/itemPane.css b/chrome/content/zotero-platform/win/itemPane.css new file mode 100644 index 0000000000..a522ae2261 --- /dev/null +++ b/chrome/content/zotero-platform/win/itemPane.css @@ -0,0 +1,30 @@ +#zotero-editpane-dynamic-fields row > hbox, +#zotero-editpane-dynamic-fields row > vbox +{ + margin-top: 0 !important; + margin-bottom: 0 !important; + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +#zotero-editpane-dynamic-fields row > hbox > hbox +{ + -moz-box-align: center; +} + +#zotero-editpane-dynamic-fields row hbox hbox label +{ + margin-top: 0; + margin-bottom: 0; +} + +#zotero-editpane-dynamic-fields row > toolbarbutton +{ + margin-right: 5px; +} + +#zotero-editpane-dynamic-fields row vbox[fieldname=abstractNote], +#zotero-editpane-dynamic-fields row vbox[fieldname=extra] +{ + margin-left: 1px; +} diff --git a/chrome/content/zotero/about.xul b/chrome/content/zotero/about.xul index dd1c34fbdb..762a62d4e2 100644 --- a/chrome/content/zotero/about.xul +++ b/chrome/content/zotero/about.xul @@ -5,22 +5,174 @@ @@ -28,7 +180,7 @@ + + + + + + &zotero.general.note; &zotero.errorReport.unrelatedMessages; + + + + + + + + + + + + &zotero.errorReport.submissionInProgress; + + + + &zotero.errorReport.submitted; + + &zotero.errorReport.includeReportID; + &zotero.errorReport.furtherAssistance; + + diff --git a/chrome/content/zotero/exportOptions.js b/chrome/content/zotero/exportOptions.js index 680314d56c..ba126c0177 100644 --- a/chrome/content/zotero/exportOptions.js +++ b/chrome/content/zotero/exportOptions.js @@ -38,6 +38,10 @@ var Zotero_File_Interface_Export = new function() { * add options to export */ function init() { + // Set font size from pref + var sbc = document.getElementById('zotero-export-options-container'); + Zotero.setFontSize(sbc); + var addedOptions = new Object(); var translators = window.arguments[0].translators; @@ -46,8 +50,10 @@ var Zotero_File_Interface_Export = new function() { var formatMenu = document.getElementById("format-menu"); var optionsBox = document.getElementById("translator-options"); + var selectedTranslator = Zotero.Prefs.get("export.lastTranslator"); + // add styles to list - for(i in translators) { + for(var i in translators) { var itemNode = document.createElement("menuitem"); itemNode.setAttribute("label", translators[i].label); listbox.appendChild(itemNode); @@ -75,6 +81,11 @@ var Zotero_File_Interface_Export = new function() { addedOptions[option] = true; } } + + // select last selected translator + if(translators[i].translatorID == selectedTranslator) { + formatMenu.selectedIndex = i; + } } // select first item by default @@ -82,17 +93,21 @@ var Zotero_File_Interface_Export = new function() { formatMenu.selectedIndex = 0; } - updateOptions(); + updateOptions(Zotero.Prefs.get("export.translatorSettings")); } /* * update translator-specific options */ - function updateOptions() { + function updateOptions(optionString) { // get selected translator var index = document.getElementById("format-menu").selectedIndex; var translatorOptions = window.arguments[0].translators[index].displayOptions; + if(optionString) { + var options = optionString.split(","); + } + var optionsBox = document.getElementById("translator-options"); for(var i=0; i - - - - - - - - - - - - diff --git a/chrome/content/zotero/ingester/progress.xul b/chrome/content/zotero/ingester/progress.xul deleted file mode 100755 index 12bc707206..0000000000 --- a/chrome/content/zotero/ingester/progress.xul +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/chrome/content/zotero/ingester/selectitems.js b/chrome/content/zotero/ingester/selectitems.js index 0d0aec9807..6674123f49 100644 --- a/chrome/content/zotero/ingester/selectitems.js +++ b/chrome/content/zotero/ingester/selectitems.js @@ -41,8 +41,11 @@ var Zotero_Ingester_Interface_SelectItems = function() {} * loading */ Zotero_Ingester_Interface_SelectItems.init = function() { + // Set font size from pref + var sbc = document.getElementById('zotero-select-items-container'); + Zotero.setFontSize(sbc); + this.io = window.arguments[0]; - this.Zotero_Ingester_Interface = window.arguments[1]; var listbox = document.getElementById("zotero-selectitems-links"); for(i in this.io.dataIn) { // we could use a tree for this if we wanted to @@ -55,6 +58,13 @@ Zotero_Ingester_Interface_SelectItems.init = function() { } } +Zotero_Ingester_Interface_SelectItems.selectAll = function(deselect) { + var listbox = document.getElementById("zotero-selectitems-links"); + for (var i=0; i - + + + modifiers="accel alt" /> \ No newline at end of file diff --git a/chrome/content/zotero/preferences.js b/chrome/content/zotero/preferences.js deleted file mode 100644 index 8051498771..0000000000 --- a/chrome/content/zotero/preferences.js +++ /dev/null @@ -1,122 +0,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 ***** -*/ - -var autoUpdateBox; -var positionMenu; -var parseEndnoteBox; -var automaticSnapshots; -var openURLMenu; -var openURLResolvers; -var openURLServerField; -var openURLVersionMenu; -var zoteroPaneOnTopInitial; - -/* - To add a new preference: - 1) modify defaults/preferences/zotero.js - 2) in this document: - a) add var above - b) add lines to init() function - c) add line to accept() function - 3) add a control to prefs.xul - 4) (Optional) To add an observer for a preference change, - add an appropriate case in the switch statement - in Zotero.Prefs.observe() -*/ - -function init() -{ - autoUpdateBox = document.getElementById('autoUpdateBox'); - autoUpdateBox.checked = Zotero.Prefs.get('automaticScraperUpdates'); - - positionMenu = document.getElementById('positionMenu'); - positionMenu.selectedIndex = zoteroPaneOnTopInitial = Zotero.Prefs.get('zoteroPaneOnTop') ? 0 : 1; - - parseEndnoteBox = document.getElementById('parseEndnoteBox'); - parseEndnoteBox.checked = Zotero.Prefs.get('parseEndNoteMIMETypes'); - - automaticSnapshots = document.getElementById('automaticSnapshots'); - automaticSnapshots.checked = Zotero.Prefs.get('automaticSnapshots'); - - openURLServerField = document.getElementById('openURLServerField'); - openURLServerField.value = Zotero.Prefs.get('openURL.resolver'); - openURLVersionMenu = document.getElementById('openURLVersionMenu'); - openURLVersionMenu.value = Zotero.Prefs.get('openURL.version'); - - openURLMenu = document.getElementById('openURLMenu'); - - openURLResolvers = Zotero.OpenURL.discoverResolvers(); - for(var i in openURLResolvers) - { - openURLMenu.insertItemAt(i,openURLResolvers[i]['name']); - if(openURLResolvers[i]['url'] == Zotero.Prefs.get('openURL.resolver') && openURLResolvers[i]['version'] == Zotero.Prefs.get('openURL.version')) - openURLMenu.selectedIndex = i; - } -} - -function accept() -{ - Zotero.Prefs.set('automaticScraperUpdates', autoUpdateBox.checked); - Zotero.Prefs.set('zoteroPaneOnTop', positionMenu.selectedIndex == 0); - - if(Zotero.Prefs.get('parseEndNoteMIMETypes') != parseEndnoteBox.checked) - { - Zotero.Prefs.set('parseEndNoteMIMETypes', parseEndnoteBox.checked); - Zotero.Ingester.MIMEHandler.init(); - } - - Zotero.Prefs.set('automaticSnapshots', automaticSnapshots.checked); - - Zotero.Prefs.set('openURL.resolver', openURLServerField.value); - Zotero.Prefs.set('openURL.version', openURLVersionMenu.value); -} - -function onOpenURLSelected() -{ - if(openURLMenu.value == "custom") - { - openURLServerField.focus(); - } - else - { - openURLServerField.value = openURLResolvers[openURLMenu.selectedIndex]['url']; - openURLVersionMenu.value = openURLResolvers[openURLMenu.selectedIndex]['version']; - } -} - -function onOpenURLCustomized() -{ - openURLMenu.value = "custom"; -} - -function onPositionChange() -{ - var statusLine = document.getElementById('statusLine'); - if (positionMenu.selectedIndex != zoteroPaneOnTopInitial) - { - statusLine.value = Zotero.getString('zotero.preferences.status.positionChange'); - } - else - { - statusLine.value = ''; - } -} \ No newline at end of file diff --git a/chrome/content/zotero/preferences.xul b/chrome/content/zotero/preferences.xul deleted file mode 100644 index 71ec5fd193..0000000000 --- a/chrome/content/zotero/preferences.xul +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/chrome/content/zotero/progressWindow.xul b/chrome/content/zotero/progressWindow.xul index 341d27d8d9..26a1b69562 100755 --- a/chrome/content/zotero/progressWindow.xul +++ b/chrome/content/zotero/progressWindow.xul @@ -5,13 +5,11 @@ - + windowtype="alert:alert"> + - diff --git a/chrome/content/zotero/reportInterface.js b/chrome/content/zotero/reportInterface.js new file mode 100644 index 0000000000..08c7c9d10c --- /dev/null +++ b/chrome/content/zotero/reportInterface.js @@ -0,0 +1,84 @@ +/* + ***** 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 ***** +*/ + + +var Zotero_Report_Interface = new function() { + this.loadCollectionReport = loadCollectionReport; + this.loadItemReport = loadItemReport; + this.loadItemReportByIds = loadItemReportByIds; + + + /* + * Load a report for the currently selected collection + */ + function loadCollectionReport() { + var queryString = ''; + + var id = ZoteroPane.getSelectedCollection(true); + var sortColumn = ZoteroPane.getSortField(); + var sortDirection = ZoteroPane.getSortDirection(); + + if (sortColumn != 'title' || sortDirection != 'ascending') { + queryString = '?sort=' + sortColumn + + (sortDirection != 'ascending' ? '/d' : ''); + } + + if (id) { + window.loadURI('zotero://report/collection/' + id + '/html/report.html' + queryString); + return; + } + + var id = ZoteroPane.getSelectedSavedSearch(true); + if (id) { + window.loadURI('zotero://report/search/' + id + '/html/report.html' + queryString); + return; + } + + throw ('No collection currently selected'); + } + + + /* + * Load a report for the currently selected items + */ + function loadItemReport() { + var items = ZoteroPane.getSelectedItems(true); + + if (!items || !items.length) { + throw ('No items currently selected'); + } + + window.loadURI('zotero://report/items/' + items.join('-') + '/html/report.html'); + } + + + /* + * Load a report for the specified items + */ + function loadItemReportByIds(ids) { + if (!ids || !ids.length) { + throw ('No itemIDs provided to loadItemReportByIds()'); + } + + window.loadURI('zotero://report/items/' + ids.join('-') + '/html/report.html'); + } +} diff --git a/chrome/content/zotero/searchDialog.js b/chrome/content/zotero/searchDialog.js index cac1ad7a18..26a8e1e96c 100644 --- a/chrome/content/zotero/searchDialog.js +++ b/chrome/content/zotero/searchDialog.js @@ -4,6 +4,10 @@ var io; function doLoad() { + // Set font size from pref + var sbc = document.getElementById('zotero-search-box-container'); + Zotero.setFontSize(sbc); + io = window.arguments[0]; document.getElementById('search-box').search = io.dataIn.search; diff --git a/chrome/content/zotero/searchDialog.xul b/chrome/content/zotero/searchDialog.xul index 73ab2ea124..c5cd9cf80a 100644 --- a/chrome/content/zotero/searchDialog.xul +++ b/chrome/content/zotero/searchDialog.xul @@ -2,7 +2,8 @@ - + + + diff --git a/chrome/content/zotero/timelineInterface.js b/chrome/content/zotero/timelineInterface.js new file mode 100644 index 0000000000..ec1e383997 --- /dev/null +++ b/chrome/content/zotero/timelineInterface.js @@ -0,0 +1,47 @@ +/* + ***** 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 ***** +*/ + + +var Zotero_Timeline_Interface = new function() { + this.loadTimeline = loadTimeline; + + /* + * Load a timeline for the currently selected collection + */ + function loadTimeline() { + var uri = 'zotero://timeline/'; + var id = ZoteroPane.getSelectedCollection(true); + + if (id) { + window.loadURI(uri + 'collection/' + id); + return; + } + + var id = ZoteroPane.getSelectedSavedSearch(true); + if (id) { + window.loadURI(uri + 'search/' + id); + return; + } + + window.loadURI(uri); + } +} diff --git a/chrome/content/zotero/tools/csledit.xul b/chrome/content/zotero/tools/csledit.xul new file mode 100644 index 0000000000..9f785c226c --- /dev/null +++ b/chrome/content/zotero/tools/csledit.xul @@ -0,0 +1,141 @@ + + + + + + + + + + + + +