From 98688c24e534d6f81ee7fb6ac22e301c1a93513f Mon Sep 17 00:00:00 2001 From: aurimasv Date: Mon, 12 Nov 2012 16:47:18 -0600 Subject: [PATCH 01/20] Remove 'about:blank?' from all links --- chrome/content/zotero/webpagedump/domsaver.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/webpagedump/domsaver.js b/chrome/content/zotero/webpagedump/domsaver.js index d93d4243b..4bad0d611 100644 --- a/chrome/content/zotero/webpagedump/domsaver.js +++ b/chrome/content/zotero/webpagedump/domsaver.js @@ -496,7 +496,7 @@ var wpdDOMSaver = { // currentURL to the URL of the frame document and afterwards back to the baseURL if (this.frameNumber < this.frameList.length) { var newFileName = this.saveDocumentEx(this.frameList[this.frameNumber++].document, this.name + "_" + this.frameNumber); - aNode.setAttribute("src", newFileName); + aNode.setAttribute("src", this.relativeLinkFix(newFileName)); } } catch (ex) { wpdCommon.addError("[wpdCommon.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName + "\n -> " + ex); @@ -574,7 +574,9 @@ var wpdDOMSaver = { return aHTMLText; }, - + // While we're replacing references with local file paths, + // we don't want to have the browser try and fetch them + // We prefix them with 'about:blank?' and remove later via repairRelativeLinks relativeLinkFix: function (aFileName) { return "about:blank?" + aFileName; }, @@ -584,7 +586,7 @@ var wpdDOMSaver = { // that sending an invalid request to the server when the img src // is a relative link to a file in a different directory repairRelativeLinks: function (aHTMLText) { - return aHTMLText.replace(/(src)="about:blank\?([^"]*)"/g, '$1="$2"'); + return aHTMLText.replace(/(src|background|data|href)="about:blank\?([^"]*)"/g, '$1="$2"'); }, From ae39584c689f554081f1304cf97c145b0862a4e9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 12 Nov 2012 20:25:46 -0500 Subject: [PATCH 02/20] Notes deleted via "-" button didn't go to trash --- chrome/content/zotero/itemPane.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index 53bdee643..fbc860d51 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -153,11 +153,10 @@ var ZoteroItemPane = new function() { this.removeNote = function (id) { - var note = Zotero.Items.get(id); var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); - if (note && ps.confirm(null, '', Zotero.getString('pane.item.notes.delete.confirm'))) { - note.erase(); + if (ps.confirm(null, '', Zotero.getString('pane.item.notes.delete.confirm'))) { + Zotero.Items.trash(id); } } From e6b4dde4720faea888ad69f06ab8d4508e8d9fd3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 13 Nov 2012 05:09:09 -0500 Subject: [PATCH 03/20] Debugging for non-PDF PDF download --- chrome/content/zotero/xpcom/attachments.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index a30bd0f3a..1f84c1a39 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -299,6 +299,7 @@ Zotero.Attachments = new function(){ Zotero.MIME.sniffForMIMEType(str) != 'application/pdf') { Zotero.debug("Downloaded PDF did not have MIME type " + "'application/pdf' in Attachments.importFromURL()", 2); + Zotero.debug(str); attachmentItem.erase(); return; } From 12ff659e9f277987a9be1c8399ae7b77bc35aa0a Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 14 Nov 2012 02:17:18 -0500 Subject: [PATCH 04/20] Workaround for minimum Firefox window height of 60 px --- chrome/content/zotero/integration/quickFormat.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 6b7995221..34020b08d 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -100,8 +100,6 @@ var Zotero_QuickFormat = new function () { } } - window.sizeToContent(); - // Nodes for citation properties panel panel = document.getElementById("citation-properties"); panelPrefix = document.getElementById("prefix"); @@ -129,8 +127,8 @@ var Zotero_QuickFormat = new function () { this.onLoad = function(event) { if(event.target !== document) return; // make sure we are visible - window.setTimeout(function() { - if(!Zotero.isFx4) window.sizeToContent(); + window.setTimeout(function() { + window.resizeTo(window.outerWidth, qfb.clientHeight); var screenX = window.screenX; var screenY = window.screenY; var xRange = [window.screen.availLeft, window.screen.width-window.outerWidth]; @@ -740,7 +738,6 @@ var Zotero_QuickFormat = new function () { qfs.removeAttribute("multiline"); window.sizeToContent(); } - var panelShowing = referencePanel.state === "open" || referencePanel.state === "showing"; if(numReferences || numSeparators) { @@ -802,7 +799,7 @@ var Zotero_QuickFormat = new function () { } referencePanel.openPopup(document.documentElement, "after_start", 15, - null, false, false, null); + qfb.clientHeight-window.clientHeight, false, false, null); if(!Zotero.isMac && !Zotero.isWin) { // reinstate noautohide after the window is shown From f6e4e5f938954f5a0f68106dc0149a84640d2bd2 Mon Sep 17 00:00:00 2001 From: adam3smith Date: Sun, 21 Oct 2012 19:55:23 -0600 Subject: [PATCH 05/20] add field mappings corresponding to CSL 1.0.1 release --- chrome/content/zotero/xpcom/utilities.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index d46c9aa1d..3fba7f035 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -36,8 +36,10 @@ const CSL_NAMES_MAPPINGS = { "editor":"editor", "bookAuthor":"container-author", "composer":"composer", + "director":"director", "interviewer":"interviewer", "recipient":"recipient", + "reviewedAuthor":"reviewed-author", "seriesEditor":"collection-editor", "translator":"translator" } @@ -57,12 +59,15 @@ const CSL_TEXT_MAPPINGS = { "volume":["volume"], "issue":["issue"], "number-of-volumes":["numberOfVolumes"], - "number-of-pages":["numPages"], + "number-of-pages":["numPages"], "edition":["edition"], "version":["version"], "section":["section"], - "genre":["type", "artworkSize"], /* artworkSize should move to SQL mapping tables, or added as a CSL variable */ + "genre":["type"], + "source":["libraryCatalog"], + "dimension": ["artworkSize", "runningTime"], "medium":["medium", "system"], + "scale":["scale"], "archive":["archive"], "archive_location":["archiveLocation"], "event":["meetingName", "conferenceName"], /* these should be mapped to the same base field in SQL mapping tables */ @@ -71,6 +76,7 @@ const CSL_TEXT_MAPPINGS = { "URL":["url"], "DOI":["DOI"], "ISBN":["ISBN"], + "ISSN":["ISSN"], "call-number":["callNumber"], "note":["extra"], "number":["number"], From 31f14a6d1490c8dd2891655bb8b3a75e32728dcd Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 15 Nov 2012 15:45:22 -0500 Subject: [PATCH 06/20] Update translators and repotime --- repotime.txt | 2 +- translators | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repotime.txt b/repotime.txt index ad41f8dbe..69a00b599 100644 --- a/repotime.txt +++ b/repotime.txt @@ -1 +1 @@ -2012-11-06 16:30:00 +2012-11-14 01:05:00 diff --git a/translators b/translators index fc00df4ee..4785f7d50 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit fc00df4eec4c4b9fa3d1e52d17eb46ff0cdfb50a +Subproject commit 4785f7d50d7c02345abd84191ec0890306cb8ace From d0feaa49cfd5af162c14c5d0829e9063108aeede Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 15 Nov 2012 15:46:21 -0500 Subject: [PATCH 07/20] Update bundled styles --- styles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles b/styles index e1a7be8e3..502b0d91a 160000 --- a/styles +++ b/styles @@ -1 +1 @@ -Subproject commit e1a7be8e32bfb94aa4f408a76e3e45b964ae5283 +Subproject commit 502b0d91ab8566c05717f913062ef7be9746e4bc From a0243a24d93e0e57d2428f8b353a8e3b12466bdf Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 15 Nov 2012 16:06:17 -0500 Subject: [PATCH 08/20] Fix QuickFormat sizing --- chrome/content/zotero/integration/quickFormat.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 34020b08d..802ddcb49 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -757,13 +757,11 @@ var Zotero_QuickFormat = new function () { } if(!referenceHeight && firstReference) { - referenceHeight = firstReference.scrollHeight; - if(firstReference === referenceBox.lastChild) referenceHeight += 1; + referenceHeight = firstReference.scrollHeight + 1; } if(!separatorHeight && firstSeparator) { - separatorHeight = firstSeparator.scrollHeight; - if(firstSeparator === referenceBox.lastChild) separatorHeight += 1; + separatorHeight = firstSeparator.scrollHeight + 1; } if(!panelFrameHeight) { From b77a87e4ca2906d071615edd4debdf62e47365f9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 15 Nov 2012 23:12:21 -0500 Subject: [PATCH 09/20] Update "Edit" string in zh-CN locale --- chrome/locale/zh-CN/zotero/standalone.dtd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/locale/zh-CN/zotero/standalone.dtd b/chrome/locale/zh-CN/zotero/standalone.dtd index 4a4092c19..876a049fe 100644 --- a/chrome/locale/zh-CN/zotero/standalone.dtd +++ b/chrome/locale/zh-CN/zotero/standalone.dtd @@ -29,7 +29,7 @@ - + From f746289299a3a1465d6d15aa2dcf95f1d35f64e5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 16 Nov 2012 02:12:50 -0500 Subject: [PATCH 10/20] Update translators and repotime --- repotime.txt | 2 +- translators | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repotime.txt b/repotime.txt index 69a00b599..cd5392c9b 100644 --- a/repotime.txt +++ b/repotime.txt @@ -1 +1 @@ -2012-11-14 01:05:00 +2012-11-15 23:00:00 diff --git a/translators b/translators index 4785f7d50..975483c10 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit 4785f7d50d7c02345abd84191ec0890306cb8ace +Subproject commit 975483c100a839cc530bd5b07d6bbdcac9898715 From 0a6a8dee6d744afe2c2a9f5800ab6b1e8f77e3a5 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Fri, 16 Nov 2012 02:33:09 -0600 Subject: [PATCH 11/20] Fix typo --- chrome/content/zotero/xpcom/utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 3fba7f035..db34c654b 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -65,7 +65,7 @@ const CSL_TEXT_MAPPINGS = { "section":["section"], "genre":["type"], "source":["libraryCatalog"], - "dimension": ["artworkSize", "runningTime"], + "dimensions": ["artworkSize", "runningTime"], "medium":["medium", "system"], "scale":["scale"], "archive":["archive"], From 231bc38c43d615a83ae21168e3329a4664e116a3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 17 Nov 2012 06:29:40 -0500 Subject: [PATCH 12/20] Fix invalid local Date Modified updates in some sync situations (This isn't new in 3.0.9.) --- chrome/content/zotero/xpcom/data/item.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 21ec40378..2d10b4ad3 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -804,7 +804,7 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) { } // If existing value, make sure it's actually changing - if (this._itemData[fieldID] === value) { + if ((this._itemData[fieldID] + "") === (value + "")) { return false; } @@ -2813,6 +2813,7 @@ Zotero.Item.prototype.relinkAttachmentFile = function(file, skipItemUpdate) { this._skipModTimeUpdate = true; } this.save(); + this._skipModTimeUpdate = false; return false; } @@ -2886,7 +2887,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentLinkMode', function (val) { + "' in Zotero.Item.attachmentLinkMode setter"); } - if (val === this._attachmentLinkMode) { + if (val === this.attachmentLinkMode) { return; } @@ -2938,7 +2939,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentMIMEType', function (val) { val = ''; } - if (val == this._attachmentMIMEType) { + if (val == this.attachmentMIMEType) { return; } @@ -2993,7 +2994,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentCharset', function (val) { val = null; } - if (val == this._attachmentCharset) { + if (val == this.attachmentCharset) { return; } @@ -3041,7 +3042,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentPath', function (val) { val = ''; } - if (val == this._attachmentPath) { + if (val == this.attachmentPath) { return; } @@ -3099,7 +3100,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentSyncState', function (val) { + "' in Zotero.Item.attachmentSyncState setter"); } - if (val == this._attachmentSyncState) { + if (val == this.attachmentSyncState) { return; } From beb74a4504d14283c120e060b7f2da5c9d1555c9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 17 Nov 2012 06:36:33 -0500 Subject: [PATCH 13/20] Version update --- install.rdf | 2 +- update.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.rdf b/install.rdf index ac3d3f50f..e7a365a4e 100644 --- a/install.rdf +++ b/install.rdf @@ -6,7 +6,7 @@ zotero@chnm.gmu.edu Zotero - 3.0.9.SOURCE + 3.0.10.SOURCE Center for History and New Media
George Mason University
Dan Cohen Sean Takats diff --git a/update.rdf b/update.rdf index b4e3150cd..4001ecc25 100644 --- a/update.rdf +++ b/update.rdf @@ -7,7 +7,7 @@ - 3.0.9.SOURCE + 3.0.10.SOURCE {ec8030f7-c20a-464f-9b0e-13a3a9e97384} From 21c040880005df04064200d80040d613babcd91b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Nov 2012 22:39:08 -0500 Subject: [PATCH 14/20] Resend tags requested by server to fix tag issue for some libraries --- chrome/content/zotero/xpcom/sync.js | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index cff2afec9..d053532bd 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -2619,6 +2619,42 @@ Zotero.Sync.Server.Data = new function() { if (_timeToYield()) yield true; + + // TEMP: Resend tags requested by server + try { + if (xml.fixtags.length()) { + for each(var tagsNode in xml.fixtags.tags) { + var libraryID = _libID(tagsNode.@libraryID); + if (libraryID && !Zotero.Libraries.isEditable(libraryID)) { + continue; + } + var tagsKeys = tagsNode.toString().split(' '); + for each(var key in tagsKeys) { + var sql = "SELECT tagID FROM tags WHERE libraryID=? AND key=?"; + var tagID = Zotero.DB.valueQuery(sql, [libraryID, key]); + + var sql = "SELECT COUNT(*) FROM itemTags WHERE tagID=?"; + if (Zotero.DB.valueQuery(sql, [tagID])) { + var sql = "UPDATE tags SET clientDateModified=CURRENT_TIMESTAMP " + + "WHERE tagID=?"; + Zotero.DB.query(sql, [tagID]); + syncSession.addToUpdated({ + objectType: 'tag', + libraryID: libraryID, + key: key + }); + } + } + } + } + } + catch (e) { + Components.utils.reportError(e); + Zotero.debug(e); + } + if (_timeToYield()) yield true; + + // Get unmodified creators embedded within items -- this is necessary if, say, // a creator was deleted locally and appears in a new/modified item remotely var embeddedCreators = {}; From a67cd6afca53c861c3796c06d754179c6ee8a9cc Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 18 Nov 2012 23:24:14 -0500 Subject: [PATCH 15/20] Update to citeproc-js 1.0.409 --- chrome/content/zotero/xpcom/citeproc.js | 65 ++++++++++++++++++++----- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index 3e8f70f47..d906a7733 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -57,7 +57,7 @@ if (!Array.indexOf) { }; } var CSL = { - PROCESSOR_VERSION: "1.0.407", + PROCESSOR_VERSION: "1.0.409", PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/, STATUTE_SUBDIV_GROUPED_REGEX: /((?:^| )(?:art|ch|Ch|subch|p|pp|para|subpara|pt|r|sec|subsec|Sec|sch|tit)\.)/g, STATUTE_SUBDIV_PLAIN_REGEX: /(?:(?:^| )(?:art|ch|Ch|subch|p|pp|para|subpara|pt|r|sec|subsec|Sec|sch|tit)\.)/, @@ -906,6 +906,7 @@ CSL.getSortCompare = function () { }; CSL.debug("Using collation sort"); } catch (e) { + CSL.debug("Using localeCompare sort"); strcmp = function (a, b) { return a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase()); }; @@ -2668,6 +2669,24 @@ CSL.Engine.prototype.retrieveItem = function (id) { Item.legislation_id = legislation_id.join("::"); } } + Item["title-short"] = Item.shortTitle; + if (Item.title && this.sys.getAbbreviation) { + var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item.title); + if (this.transform.abbrevs[jurisdiction].title) { + if (this.transform.abbrevs[jurisdiction].title[Item.title]) { + Item["title-short"] = this.transform.abbrevs[jurisdiction].title[Item.title]; + } + } + } + Item["container-title-short"] = Item.journalAbbreviation; + if (Item["container-title"] && this.sys.getAbbreviation) { + var jurisdiction = this.transform.loadAbbreviation(Item.jurisdiction, "title", Item["container-title"]); + if (this.transform.abbrevs[jurisdiction].title) { + if (this.transform.abbrevs[jurisdiction].title[Item["container-title"]]) { + Item["container-title-short"] = this.transform.abbrevs[jurisdiction].title[Item["container-title"]]; + } + } + } return Item; }; CSL.Engine.prototype.setOpt = function (token, name, value) { @@ -3546,6 +3565,12 @@ CSL.getBibliographyEntries = function (bibsection) { for (i = 0, ilen = rule.triggers.length; i < ilen; i += 1) { if (clonedItem[rule.triggers[i]]) { delete clonedItem[rule.triggers[i]]; + if (rule.triggers[i] === "title-short") { + delete clonedItem.shortTitle; + } + if (rule.triggers[i] === "container-title-short") { + delete clonedItem.journalAbbreviation; + } } } var newID = clonedItem.id + ":gen"; @@ -4246,6 +4271,8 @@ CSL.getSpliceDelimiter = function (last_collapsed, pos) { this.tmp.splice_delimiter = this.citation.opt["after-collapse-delimiter"]; } else if (this.tmp.have_collapsed && this.opt.xclass === "in-text" && this.opt.update_mode !== CSL.NUMERIC) { this.tmp.splice_delimiter = ", "; + } else if (this.tmp.use_cite_group_delimiter) { + this.tmp.splice_delimiter = this.citation.opt.cite_group_delimiter; } else if (this.tmp.cite_locales[pos - 1]) { var alt_affixes = this.tmp.cite_affixes[this.tmp.cite_locales[pos - 1]]; if (alt_affixes && alt_affixes.delimiter) { @@ -4913,8 +4940,10 @@ CSL.Node.citation = { } if (this.tokentype === CSL.END) { state.opt.grouped_sort = state.opt.xclass === "in-text" - && state.citation.opt.collapse - && state.citation.opt.collapse.length + && (state.citation.opt.collapse + && state.citation.opt.collapse.length) + || (state.citation.opt.cite_group_delimiter + && state.citation.opt.cite_group_delimiter.length) && state.opt.update_mode !== CSL.POSITION && state.opt.update_mode !== CSL.NUMERIC; if (state.opt.grouped_sort @@ -6164,7 +6193,9 @@ CSL.NameOutput.prototype._collapseAuthor = function () { } if ((this.item && this.item["suppress-author"] && this._first_creator_variable == this.variables[0]) || (this.state[this.state.tmp.area].opt.collapse - && this.state[this.state.tmp.area].opt.collapse.length)) { + && this.state[this.state.tmp.area].opt.collapse.length) + || (this.state[this.state.tmp.area].opt.cite_group_delimiter + && this.state[this.state.tmp.area].opt.cite_group_delimiter.length)) { if (this.state.tmp.authorstring_request) { mystr = ""; myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs; @@ -6175,7 +6206,7 @@ CSL.NameOutput.prototype._collapseAuthor = function () { this.state.tmp.offset_characters = oldchars; this.state.registry.authorstrings[this.Item.id] = mystr; } else if (!this.state.tmp.just_looking - && !this.state.tmp.suppress_decorations) { + && !this.state.tmp.suppress_decorations && (this.item["suppress-author"] || (this.state[this.state.tmp.area].opt.collapse && this.state[this.state.tmp.area].opt.collapse.length) || this.state[this.state.tmp.area].opt.cite_group_delimiter && this.state[this.state.tmp.area].opt.cite_group_delimiter)) { mystr = ""; myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs; oldchars = this.state.tmp.offset_characters; @@ -6183,9 +6214,14 @@ CSL.NameOutput.prototype._collapseAuthor = function () { mystr = this.state.output.string(this.state, myqueue, false); } if (mystr === this.state.tmp.last_primary_names_string) { - this.state.tmp.name_node.top.blobs.pop(); - this.state.tmp.name_node.children = []; - this.state.tmp.offset_characters = oldchars; + if (this.item["suppress-author"] || (this.state[this.state.tmp.area].opt.collapse && this.state[this.state.tmp.area].opt.collapse.length)) { + this.state.tmp.name_node.top.blobs.pop(); + this.state.tmp.name_node.children = []; + this.state.tmp.offset_characters = oldchars; + } + if (this.state[this.state.tmp.area].opt.cite_group_delimiter && this.state[this.state.tmp.area].opt.cite_group_delimiter) { + this.state.tmp.use_cite_group_delimiter = true; + } } else { this.state.tmp.last_primary_names_string = mystr; if (this.variables.indexOf(this._first_creator_variable) > -1 && this.item && this.item["suppress-author"] && this.Item.type !== "legal_case") { @@ -6195,6 +6231,9 @@ CSL.NameOutput.prototype._collapseAuthor = function () { this.state.tmp.term_predecessor = false; } this.state.tmp.have_collapsed = false; + if (this.state[this.state.tmp.area].opt.cite_group_delimiter && this.state[this.state.tmp.area].opt.cite_group_delimiter) { + this.state.tmp.use_cite_group_delimiter = false; + } } } } @@ -7983,7 +8022,7 @@ CSL.Node.names = { } state.build.names_level += -1; this.label = state.build.name_label; - state.build.name_label = undefined; + state.build.name_label = {}; state.build.names_variables.pop(); var mywith = "with"; var with_default_prefix = ""; @@ -9270,6 +9309,11 @@ CSL.Attributes["@collapse"] = function (state, arg) { state[this.name].opt.collapse = arg; } }; +CSL.Attributes["@cite-group-delimiter"] = function (state, arg) { + if (arg) { + state[state.tmp.area].opt.cite_group_delimiter = arg; + } +}; CSL.Attributes["@names-delimiter"] = function (state, arg) { state.setOpt(this, "names-delimiter", arg); }; @@ -9647,9 +9691,6 @@ CSL.Transform = function (state) { if (["genre", "event", "medium"].indexOf(myabbrev_family) > -1) { myabbrev_family = "title"; } - if (["title-short"].indexOf(myabbrev_family) > -1) { - myabbrev_family = "title"; - } value = ""; if (state.sys.getAbbreviation) { var jurisdiction = state.transform.loadAbbreviation(Item.jurisdiction, myabbrev_family, basevalue); From 711e180f8f90eb3c73ec18c7599b486f924edbac Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Nov 2012 23:25:58 -0500 Subject: [PATCH 16/20] Update version --- chrome/content/zotero/xpcom/zotero.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 3338e7b9c..11580841e 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -35,7 +35,7 @@ const ZOTERO_CONFIG = { API_URL: 'https://api.zotero.org/', PREF_BRANCH: 'extensions.zotero.', BOOKMARKLET_URL: 'https://www.zotero.org/bookmarklet/', - VERSION: "3.0.9.SOURCE" + VERSION: "3.0.10.SOURCE" }; /* From 4662c5054cd5123e7eeee1560207213c2202caf8 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Nov 2012 23:27:04 -0500 Subject: [PATCH 17/20] Update submodules and repotime --- chrome/content/zotero/locale/csl | 2 +- repotime.txt | 2 +- translators | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/locale/csl b/chrome/content/zotero/locale/csl index 92270bbba..071ffc63f 160000 --- a/chrome/content/zotero/locale/csl +++ b/chrome/content/zotero/locale/csl @@ -1 +1 @@ -Subproject commit 92270bbba9fb59a57042003a7637afc8e694a94f +Subproject commit 071ffc63f4093550d18de5e62e32db506f2b5aa0 diff --git a/repotime.txt b/repotime.txt index cd5392c9b..cbe0afbf9 100644 --- a/repotime.txt +++ b/repotime.txt @@ -1 +1 @@ -2012-11-15 23:00:00 +2012-11-18 22:15:00 diff --git a/translators b/translators index 975483c10..dfd0239e0 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit 975483c100a839cc530bd5b07d6bbdcac9898715 +Subproject commit dfd0239e0e042d5ba4da0e806003849f6e1b1e7a From fbbfe93ce5c6a829921d2d9bb9d012fe5c5e6bce Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Nov 2012 23:29:58 -0500 Subject: [PATCH 18/20] Update styles --- styles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles b/styles index 502b0d91a..90265e117 160000 --- a/styles +++ b/styles @@ -1 +1 @@ -Subproject commit 502b0d91ab8566c05717f913062ef7be9746e4bc +Subproject commit 90265e1171d5f7e597984d9a7ff90c6f55e7cac3 From 4eb2fae0b3defcc8aa14609440ff0ba033558ac4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Nov 2012 23:36:22 -0500 Subject: [PATCH 19/20] Potential optimization for itemTags lookup --- chrome/content/zotero/xpcom/sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index d053532bd..9b03fb468 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -2633,7 +2633,7 @@ Zotero.Sync.Server.Data = new function() { var sql = "SELECT tagID FROM tags WHERE libraryID=? AND key=?"; var tagID = Zotero.DB.valueQuery(sql, [libraryID, key]); - var sql = "SELECT COUNT(*) FROM itemTags WHERE tagID=?"; + var sql = "SELECT COUNT(*) > 0 FROM itemTags WHERE tagID=?"; if (Zotero.DB.valueQuery(sql, [tagID])) { var sql = "UPDATE tags SET clientDateModified=CURRENT_TIMESTAMP " + "WHERE tagID=?"; From a0f0d5299574d818e940a28533b98e20695a7a42 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 19 Nov 2012 00:23:16 -0500 Subject: [PATCH 20/20] Fix infinite spinning on login error in 3.0.9 (from ade715ff0) --- chrome/content/zotero/xpcom/sync.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 9b03fb468..96d404496 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -1284,13 +1284,13 @@ Zotero.Sync.Server = new function () { if (response.firstChild.tagName == 'error') { if (response.firstChild.getAttribute('code') == 'INVALID_LOGIN') { var e = new Zotero.Error(Zotero.getString('sync.error.invalidLogin'), "INVALID_SYNC_LOGIN"); - _error(e, true); + _error(e, false, true); } - _error(response.firstChild.firstChild.nodeValue, true); + _error(response.firstChild.firstChild.nodeValue, false, true); } if (_sessionID) { - _error("Session ID already set in Zotero.Sync.Server.login()", true) + _error("Session ID already set in Zotero.Sync.Server.login()", false, true) } // [abcdefg0-9]{32} @@ -1299,7 +1299,7 @@ Zotero.Sync.Server = new function () { var re = /^[abcdefg0-9]{32}$/; if (!re.test(_sessionID)) { _sessionID = null; - _error('Invalid session ID received from server', true); + _error('Invalid session ID received from server', false, true); }