diff --git a/chrome/content/zotero-platform/win/overlay.css b/chrome/content/zotero-platform/win/overlay.css index b90ec7c58a..5a384e9111 100644 --- a/chrome/content/zotero-platform/win/overlay.css +++ b/chrome/content/zotero-platform/win/overlay.css @@ -90,7 +90,7 @@ #zotero-view-item { padding: 0 !important; -moz-appearance: none; - background-color: white; + background-color: -moz-field; border-width: 1px 0 0 1px; } diff --git a/chrome/content/zotero/locale/csl b/chrome/content/zotero/locale/csl index 6c4c38a013..76af974142 160000 --- a/chrome/content/zotero/locale/csl +++ b/chrome/content/zotero/locale/csl @@ -1 +1 @@ -Subproject commit 6c4c38a013f58dea82d683e4c8b70ff25da8172c +Subproject commit 76af9741424cc1432ffa0165d7b7bd5bbebe0d26 diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index fb38d52289..202b5ef530 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -80,7 +80,7 @@ if (!Array.indexOf) { }; } var CSL = { - PROCESSOR_VERSION: "1.0.536", + PROCESSOR_VERSION: "1.0.539", CONDITION_LEVEL_TOP: 1, CONDITION_LEVEL_BOTTOM: 2, PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/, @@ -1029,11 +1029,16 @@ CSL.getSortCompare = function (default_locale) { return CSL.stringCompare; } var strcmp; + var strcmp_opts = { + sensitivity:"base", + ignorePunctuation:true, + numeric:true + } if (!default_locale) { default_locale = "en-US"; } strcmp = function (a, b) { - return a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase()); + return a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase(),default_locale,strcmp_opts); }; var stripPunct = function (str) { return str.replace(/^[\[\]\'\"]*/g, ""); @@ -4262,6 +4267,7 @@ CSL.getAmbiguousCite = function (Item, disambig, visualForm) { }; if (this.registry.registry[Item.id] && this.registry.citationreg.citationsByItemId + && this.registry.citationreg.citationsByItemId[Item.id] && this.registry.citationreg.citationsByItemId[Item.id].length && visualForm) { if (this.citation.opt["givenname-disambiguation-rule"] === "by-cite") { @@ -7362,7 +7368,9 @@ CSL.NameOutput.prototype._runDisambigNames = function (lst, pos) { param = paramx; } if (!this.state.tmp.just_looking && this.item && this.item.position === CSL.POSITION_FIRST) { - param = paramx; + if (paramx > param) { + param = paramx; + } } if (!this.state.tmp.sort_key_flag) { this.state.tmp.disambig_settings.givens[pos][i] = param; diff --git a/chrome/content/zotero/xpcom/openurl.js b/chrome/content/zotero/xpcom/openurl.js index d281562753..941288307a 100644 --- a/chrome/content/zotero/xpcom/openurl.js +++ b/chrome/content/zotero/xpcom/openurl.js @@ -243,6 +243,13 @@ Zotero.OpenURL = new function() { if(asObj) return entries; return entries.join("&"); } + + function _cloneIfNecessary(obj1, obj2) { + if(Zotero.isFx && !Zotero.isBookmarklet && Zotero.platformMajorVersion >= 32) { + return Components.utils.cloneInto(obj1, obj2); + } + return obj1; + } /* * Generates an item in the format returned by item.fromArray() given an @@ -380,14 +387,14 @@ Zotero.OpenURL = new function() { if(complexAu.length && !lastCreator.lastName && !lastCreator.institutional) { lastCreator.lastName = value; } else { - complexAu.push({lastName:value, creatorType:(key == "rft.aulast" ? "author" : "inventor"), offset:item.creators.length}); + complexAu.push(_cloneIfNecessary({lastName:value, creatorType:(key == "rft.aulast" ? "author" : "inventor"), offset:item.creators.length}, item)); } } else if(key == "rft.aufirst" || key == "rft.invfirst") { var lastCreator = complexAu[complexAu.length-1]; if(complexAu.length && !lastCreator.firstName && !lastCreator.institutional) { lastCreator.firstName = value; } else { - complexAu.push({firstName:value, creatorType:(key == "rft.aufirst" ? "author" : "inventor"), offset:item.creators.length}); + complexAu.push(_cloneIfNecessary({firstName:value, creatorType:(key == "rft.aufirst" ? "author" : "inventor"), offset:item.creators.length}, item)); } } else if(key == "rft.au" || key == "rft.creator" || key == "rft.contributor" || key == "rft.inventor") { if(key == "rft.contributor") { @@ -398,13 +405,9 @@ Zotero.OpenURL = new function() { var type = "author"; } - if(value.indexOf(",") !== -1) { - item.creators.push(Zotero.Utilities.cleanAuthor(value, type, true)); - } else { - item.creators.push(Zotero.Utilities.cleanAuthor(value, type, false)); - } + item.creators.push(_cloneIfNecessary(Zotero.Utilities.cleanAuthor(value, type, value.indexOf(",") !== -1), item)); } else if(key == "rft.aucorp") { - complexAu.push({lastName:value, isInstitution:true}); + complexAu.push(_cloneIfNecessary({lastName:value, isInstitution:true}, item)); } else if(key == "rft.isbn" && !item.ISBN) { item.ISBN = value; } else if(key == "rft.pub" || key == "rft.publisher") { @@ -475,17 +478,18 @@ Zotero.OpenURL = new function() { var pushMe = true; var offset = complexAu[i].offset; delete complexAu[i].offset; - for(var j=0; j= complexAu[i].firstName.length && - item.creators[j].firstName.substr(0, complexAu[i].firstName.length) == complexAu[i].firstName))) { - pushMe = false; - break; - } + for (var j = 0; j < item.creators.length; j++) { + // if there's a plain author that is close to this author (the + // same last name, and the same first name up to a point), keep + // the plain author, since it might have a middle initial + if (item.creators[j].lastName == complexAu[i].lastName && + item.creators[j].firstName && + ((item.creators[j].firstName == "" && complexAu[i].firstName == "") || + (item.creators[j].firstName.length >= complexAu[i].firstName.length && + item.creators[j].firstName.substr(0, complexAu[i].firstName.length) == complexAu[i].firstName))) { + pushMe = false; + break; + } } // Splice in the complex creator at the correct location, // accounting for previous insertions diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index 5d3e3ed994..bff1f2d002 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -462,16 +462,6 @@ Zotero.Translate.SandboxManager.prototype = { if(isFunction) { attachTo[localKey] = function() { var args = Array.prototype.slice.apply(arguments); - if(Zotero.platformMajorVersion >= 32) { - // This is necessary on Nightly and works - // fine on 31, but apparently breaks - // ZU.xpath in an unusual way on 24 - for(var i=0; i= 32) { + creator = Components.utils.cloneInto(creator, item); + } item.creators.push(creator); } } diff --git a/chrome/skin/default/zotero/bindings/tagselector.css b/chrome/skin/default/zotero/bindings/tagselector.css index e67b6211b2..f5f11e569f 100644 --- a/chrome/skin/default/zotero/bindings/tagselector.css +++ b/chrome/skin/default/zotero/bindings/tagselector.css @@ -11,7 +11,7 @@ groupbox overflow-x: hidden; overflow-y: auto; display: block; /* allow labels to wrap instead of all being in one line */ - background-color: white; + background-color: -moz-field; } checkbox diff --git a/resource/schema/renamed-styles.json b/resource/schema/renamed-styles.json index e3c4809d35..424270afa1 100644 --- a/resource/schema/renamed-styles.json +++ b/resource/schema/renamed-styles.json @@ -23,6 +23,7 @@ "annual-reviews-alphabetically": "annual-reviews-alphabetical", "annual-reviews-by-appearance": "annual-reviews", "apa5th": "apa-5th-edition", + "apa-fr": "apa-fr-provost", "apsa": "american-political-science-association", "archives-of-dermatology": "jama-dermatology", "asa": "american-sociological-association", diff --git a/resource/schema/repotime.txt b/resource/schema/repotime.txt index ea0164d7fc..f6d5eacc2a 100644 --- a/resource/schema/repotime.txt +++ b/resource/schema/repotime.txt @@ -1 +1 @@ -2014-06-24 00:00:01 +2014-09-01 18:06:00 diff --git a/styles b/styles index feb40111ba..c8aed347ae 160000 --- a/styles +++ b/styles @@ -1 +1 @@ -Subproject commit feb40111bacae97b61cfbf8b4948054ead1b4570 +Subproject commit c8aed347aed9a6350a48f3d6f9d4b0df13fc1f6f diff --git a/translators b/translators index 1c919d5c3d..821eda178b 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit 1c919d5c3d9e6be7106c36cbacd34ae850167497 +Subproject commit 821eda178b2fe1c7e7bbabc5d7a3113923a4f9c7