commit 421e570ada42e1f8022c5d6bfefdad99ffb41789 parent 0031f0d319f682c1da590411af8a598a2af8ae63 Author: Simon Kornblith <simon@simonster.com> Date: Tue, 9 Aug 2011 03:49:06 +0000 Fix a bug in QuickFormat years and enable QuickFormat by default Diffstat:
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js @@ -217,7 +217,7 @@ var Zotero_QuickFormat = new function () { if(year) { Zotero.debug("QuickFormat: Year: "+year); - s.addCondition("date", "isAfter", (year)+"-01-01 00:00:00"); + s.addCondition("date", "isAfter", (year-1)+"-12-31 23:59:59"); s.addCondition("date", "isBefore", (year)+"-12-31 23:59:59"); haveConditions = true; } diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul @@ -558,7 +558,8 @@ To add a new preference: image="chrome://zotero/skin/prefs-styles.png"> <preferences id="zotero-preferences-cite"> - <preference id="pref-styles-citePaperJournalArticleURL" name="extensions.zotero.export.citePaperJournalArticleURL" type="bool"/> + <preference id="pref-cite-citePaperJournalArticleURL" name="extensions.zotero.export.citePaperJournalArticleURL" type="bool"/> + <preference id="pref-cite-useClassicAddCitationDialog" name="extensions.zotero.integration.useClassicAddCitationDialog" type="bool"/> </preferences> <tabbox> @@ -571,6 +572,7 @@ To add a new preference: <label id="wordProcessors-noWordProcessorPluginsInstalled" width="45em" hidden="true"> &zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled; </label> + <checkbox label="&zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog;" preference="pref-cite-useClassicAddCitationDialog"/> <label id="wordProcessors-getWordProcessorPlugins" class="text-link" href="&zotero.preferences.cite.wordProcessors.getPlugins.url;" value="&zotero.preferences.cite.wordProcessors.getPlugins;"/> </tabpanel> <tabpanel orient="vertical" id="styles"> @@ -598,7 +600,7 @@ To add a new preference: <groupbox> <caption label="&zotero.preferences.citationOptions.caption;"/> - <checkbox label="&zotero.preferences.export.citePaperJournalArticleURL;" preference="pref-styles-citePaperJournalArticleURL"/> + <checkbox label="&zotero.preferences.export.citePaperJournalArticleURL;" preference="pref-cite-citePaperJournalArticleURL"/> <!-- This doesn't wrap without an explicit width, for some reason --> <label id="export-citePaperJournalArticleURL" width="45em"> &zotero.preferences.export.citePaperJournalArticleURL.description; diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -1954,10 +1954,10 @@ Zotero.Integration.Session.prototype.editCitation = function(index, noteIndex, c // citeproc-js style object for use of third-party extension io.style = this.style; - if(Zotero.Prefs.get("integration.quickFormat")) { - this._displayDialog('chrome://zotero/content/integration/quickFormat.xul', '', io); - } else { + if(Zotero.Prefs.get("integration.useClassicAddCitationDialog")) { this._displayDialog('chrome://zotero/content/integration/addCitationDialog.xul', 'resizable', io); + } else { + this._displayDialog('chrome://zotero/content/integration/quickFormat.xul', '', io); } if(io.citation.citationItems.length) { // we have an item diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd @@ -106,6 +106,7 @@ <!ENTITY zotero.preferences.cite.wordProcessors.noWordProcessorPluginsInstalled "No word processor plug-ins are currently installed."> <!ENTITY zotero.preferences.cite.wordProcessors.getPlugins "Get word processor plug-ins..."> <!ENTITY zotero.preferences.cite.wordProcessors.getPlugins.url "http://www.zotero.org/support/word_processor_plugin_installation"> +<!ENTITY zotero.preferences.cite.wordProcessors.useClassicAddCitationDialog "Use classic Add Citation dialog"> <!ENTITY zotero.preferences.cite.styles.styleManager "Style Manager"> <!ENTITY zotero.preferences.cite.styles.styleManager.title "Title"> diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js @@ -105,7 +105,7 @@ pref("extensions.zotero.export.quickCopy.compatibility.word", false); // Integration settings pref("extensions.zotero.integration.port", 50001); pref("extensions.zotero.integration.autoRegenerate", -1); // -1 = ask; 0 = no; 1 = yes -pref("extensions.zotero.integration.quickFormat", false); +pref("extensions.zotero.integration.useClassicAddCitationDialog", false); // Connector settings pref("extensions.zotero.httpServer.enabled", false); // TODO enabled for testing only