From 80d98e0bcb630c9b28303a23290dc1a60d2de566 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 30 Jul 2012 19:19:04 -0400 Subject: [PATCH 1/6] Drop "0-" before the URL on III proxies before attempting subdomain dropping --- chrome/content/zotero/xpcom/translation/translator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/translation/translator.js b/chrome/content/zotero/xpcom/translation/translator.js index 73ee6a3a3..cc933bc88 100644 --- a/chrome/content/zotero/xpcom/translation/translator.js +++ b/chrome/content/zotero/xpcom/translation/translator.js @@ -220,7 +220,10 @@ Zotero.Translators = new function() { // (i.e., www.nature.com.mutex.gmu.edu => www.nature.com) var m = /^(https?:\/\/)([^\/]+)/i.exec(uri); if(m) { - var hostnames = m[2].split("."); + // First, drop the 0- if it exists (this is an III invention) + var host = m[2]; + if(host.substr(0, 2) === "0-") host = substr(2); + var hostnames = host.split("."); for(var i=1; i Date: Mon, 30 Jul 2012 19:20:44 -0400 Subject: [PATCH 2/6] Drop "0-" before the URL on III proxies before attempting subdomain dropping for connectors --- chrome/content/zotero/xpcom/connector/translator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/connector/translator.js b/chrome/content/zotero/xpcom/connector/translator.js index 3418f90e2..1bba38f28 100644 --- a/chrome/content/zotero/xpcom/connector/translator.js +++ b/chrome/content/zotero/xpcom/connector/translator.js @@ -158,7 +158,10 @@ Zotero.Translators = new function() { var properHosts = []; var proxyHosts = []; if(m) { - var hostnames = m[2].split("."); + // First, drop the 0- if it exists (this is an III invention) + var host = m[2]; + if(host.substr(0, 2) === "0-") host = substr(2); + var hostnames = host.split("."); for(var i=1; i Date: Wed, 1 Aug 2012 10:52:00 -0400 Subject: [PATCH 3/6] Fix "Use profile directory" option to use correct app name --- chrome/content/zotero/xpcom/zotero.js | 2 +- chrome/locale/en-US/zotero/zotero.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 5fab54bf3..bcca8a99f 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -334,7 +334,7 @@ const ZOTERO_CONFIG = { Zotero.getString('dataDir.previousDir') + ' ' + Zotero.Prefs.get('lastDataDir'), buttonFlags, null, - Zotero.getString('dataDir.useProfileDir'), + Zotero.getString('dataDir.useProfileDir', Zotero.appName), Zotero.getString('general.locate'), null, {}); diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 9b15eec37..1fc73357d 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -67,7 +67,7 @@ errorReport.actualResult = Actual result: dataDir.notFound = The Zotero data directory could not be found. dataDir.previousDir = Previous directory: -dataDir.useProfileDir = Use Firefox profile directory +dataDir.useProfileDir = Use %S profile directory dataDir.selectDir = Select a Zotero data directory dataDir.selectedDirNonEmpty.title = Directory Not Empty dataDir.selectedDirNonEmpty.text = The directory you selected is not empty and does not appear to be a Zotero data directory.\n\nCreate Zotero files in this directory anyway? From 1dca17c96bd1c3baf8b771b4add088c1df1d9d88 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 2 Aug 2012 09:01:19 -0400 Subject: [PATCH 4/6] Add autocomplete for 'book' 'series' field --- chrome/content/zotero/xpcom/data/itemFields.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/data/itemFields.js b/chrome/content/zotero/xpcom/data/itemFields.js index 6af62f619..fbb56cc5e 100644 --- a/chrome/content/zotero/xpcom/data/itemFields.js +++ b/chrome/content/zotero/xpcom/data/itemFields.js @@ -307,6 +307,7 @@ Zotero.ItemFields = new function() { var autoCompleteFields = [ 'journalAbbreviation', + 'series', 'seriesTitle', 'seriesText', 'libraryCatalog', From bacd25633b34897f314a323a59d272678a371609 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 2 Aug 2012 16:59:28 -0400 Subject: [PATCH 5/6] Fix error updating types menu after installation of NSF item type --- chrome/content/zotero/xpcom/schema.js | 2 +- chrome/content/zotero/zoteroPane.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 3373f6d70..868d75722 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -380,7 +380,7 @@ Zotero.Schema = new function(){ var enumerator = wm.getEnumerator("navigator:browser"); while (enumerator.hasMoreElements()) { var win = enumerator.getNext(); - win.ZoteroPane.buildItemTypeMenus(); + win.ZoteroPane.buildItemTypeSubMenu(); win.document.getElementById('zotero-editpane-item-box').buildItemTypeMenu(); } } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index e60044118..7dc0f032e 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -256,6 +256,10 @@ var ZoteroPane = new function() this.buildItemTypeSubMenu = function () { var moreMenu = document.getElementById('zotero-tb-add-more'); + while (moreMenu.hasChildNodes()) { + moreMenu.removeChild(moreMenu.firstChild); + } + // Sort by localized name var t = Zotero.ItemTypes.getSecondaryTypes(); var itemTypes = []; From c57f512aea43abb7941d82defe2a6f8b19c839f6 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 5 Aug 2012 19:44:04 -0400 Subject: [PATCH 6/6] Don't save null tags to server --- chrome/content/zotero/xpcom/utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index fc95506c1..e64a8fcde 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1218,7 +1218,7 @@ Zotero.Utilities = { } else if(field === "tags") { // normalize tags var n = val.length; - var newTags = newItem.tags = new Array(n); + var newTags = newItem.tags = []; for(var j=0; j