Merge branch '3.0'
Conflicts: chrome/content/zotero/integration/quickFormat.js chrome/content/zotero/xpcom/attachments.js chrome/content/zotero/xpcom/utilities.js install.rdf styles update.rdf
This commit is contained in:
commit
ac195d2a5e
15 changed files with 124 additions and 45 deletions
|
@ -100,8 +100,6 @@ var Zotero_QuickFormat = new function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.sizeToContent();
|
|
||||||
|
|
||||||
// Nodes for citation properties panel
|
// Nodes for citation properties panel
|
||||||
panel = document.getElementById("citation-properties");
|
panel = document.getElementById("citation-properties");
|
||||||
panelPrefix = document.getElementById("prefix");
|
panelPrefix = document.getElementById("prefix");
|
||||||
|
@ -130,8 +128,8 @@ var Zotero_QuickFormat = new function () {
|
||||||
this.onLoad = function(event) {
|
this.onLoad = function(event) {
|
||||||
if(event.target !== document) return;
|
if(event.target !== document) return;
|
||||||
// make sure we are visible
|
// make sure we are visible
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
window.sizeToContent();
|
window.resizeTo(window.outerWidth, qfb.clientHeight);
|
||||||
var screenX = window.screenX;
|
var screenX = window.screenX;
|
||||||
var screenY = window.screenY;
|
var screenY = window.screenY;
|
||||||
var xRange = [window.screen.availLeft, window.screen.width-window.outerWidth];
|
var xRange = [window.screen.availLeft, window.screen.width-window.outerWidth];
|
||||||
|
@ -741,7 +739,6 @@ var Zotero_QuickFormat = new function () {
|
||||||
qfs.removeAttribute("multiline");
|
qfs.removeAttribute("multiline");
|
||||||
window.sizeToContent();
|
window.sizeToContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
var panelShowing = referencePanel.state === "open" || referencePanel.state === "showing";
|
var panelShowing = referencePanel.state === "open" || referencePanel.state === "showing";
|
||||||
|
|
||||||
if(numReferences || numSeparators) {
|
if(numReferences || numSeparators) {
|
||||||
|
@ -752,13 +749,11 @@ var Zotero_QuickFormat = new function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!referenceHeight && firstReference) {
|
if(!referenceHeight && firstReference) {
|
||||||
referenceHeight = firstReference.scrollHeight;
|
referenceHeight = firstReference.scrollHeight + 1;
|
||||||
if(firstReference === referenceBox.lastChild) referenceHeight += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!separatorHeight && firstSeparator) {
|
if(!separatorHeight && firstSeparator) {
|
||||||
separatorHeight = firstSeparator.scrollHeight;
|
separatorHeight = firstSeparator.scrollHeight + 1;
|
||||||
if(firstSeparator === referenceBox.lastChild) separatorHeight += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!panelFrameHeight) {
|
if(!panelFrameHeight) {
|
||||||
|
@ -794,7 +789,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
referencePanel.openPopup(document.documentElement, "after_start", 15,
|
referencePanel.openPopup(document.documentElement, "after_start", 15,
|
||||||
null, false, false, null);
|
qfb.clientHeight-window.clientHeight, false, false, null);
|
||||||
|
|
||||||
if(!Zotero.isMac && !Zotero.isWin) {
|
if(!Zotero.isMac && !Zotero.isWin) {
|
||||||
// reinstate noautohide after the window is shown
|
// reinstate noautohide after the window is shown
|
||||||
|
|
|
@ -155,11 +155,10 @@ var ZoteroItemPane = new function() {
|
||||||
|
|
||||||
|
|
||||||
this.removeNote = function (id) {
|
this.removeNote = function (id) {
|
||||||
var note = Zotero.Items.get(id);
|
|
||||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
.getService(Components.interfaces.nsIPromptService);
|
.getService(Components.interfaces.nsIPromptService);
|
||||||
if (note && ps.confirm(null, '', Zotero.getString('pane.item.notes.delete.confirm'))) {
|
if (ps.confirm(null, '', Zotero.getString('pane.item.notes.delete.confirm'))) {
|
||||||
note.erase();
|
Zotero.Items.trash(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 92270bbba9fb59a57042003a7637afc8e694a94f
|
Subproject commit 071ffc63f4093550d18de5e62e32db506f2b5aa0
|
|
@ -496,7 +496,7 @@ var wpdDOMSaver = {
|
||||||
// currentURL to the URL of the frame document and afterwards back to the baseURL
|
// currentURL to the URL of the frame document and afterwards back to the baseURL
|
||||||
if (this.frameNumber < this.frameList.length) {
|
if (this.frameNumber < this.frameList.length) {
|
||||||
var newFileName = this.saveDocumentEx(this.frameList[this.frameNumber++].document, this.name + "_" + this.frameNumber);
|
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) {
|
} catch (ex) {
|
||||||
wpdCommon.addError("[wpdCommon.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName + "\n -> " + ex);
|
wpdCommon.addError("[wpdCommon.processDOMNode]:\n -> aNode.nodeName: " + aNode.nodeName + "\n -> " + ex);
|
||||||
|
@ -574,7 +574,9 @@ var wpdDOMSaver = {
|
||||||
return aHTMLText;
|
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) {
|
relativeLinkFix: function (aFileName) {
|
||||||
return "about:blank?" + aFileName;
|
return "about:blank?" + aFileName;
|
||||||
},
|
},
|
||||||
|
@ -584,7 +586,7 @@ var wpdDOMSaver = {
|
||||||
// that sending an invalid request to the server when the img src
|
// that sending an invalid request to the server when the img src
|
||||||
// is a relative link to a file in a different directory
|
// is a relative link to a file in a different directory
|
||||||
repairRelativeLinks: function (aHTMLText) {
|
repairRelativeLinks: function (aHTMLText) {
|
||||||
return aHTMLText.replace(/(src)="about:blank\?([^"]*)"/g, '$1="$2"');
|
return aHTMLText.replace(/(src|background|data|href)="about:blank\?([^"]*)"/g, '$1="$2"');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -302,6 +302,7 @@ Zotero.Attachments = new function(){
|
||||||
var errString = "Downloaded PDF did not have MIME type "
|
var errString = "Downloaded PDF did not have MIME type "
|
||||||
+ "'application/pdf' in Attachments.importFromURL()";
|
+ "'application/pdf' in Attachments.importFromURL()";
|
||||||
Zotero.debug(errString, 2);
|
Zotero.debug(errString, 2);
|
||||||
|
Zotero.debug(str);
|
||||||
attachmentItem.erase();
|
attachmentItem.erase();
|
||||||
if(callback) callback(false, new Error(errString));
|
if(callback) callback(false, new Error(errString));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -57,7 +57,7 @@ if (!Array.indexOf) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var CSL = {
|
var CSL = {
|
||||||
PROCESSOR_VERSION: "1.0.407",
|
PROCESSOR_VERSION: "1.0.409",
|
||||||
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
|
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_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)\.)/,
|
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");
|
CSL.debug("Using collation sort");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
CSL.debug("Using localeCompare sort");
|
||||||
strcmp = function (a, b) {
|
strcmp = function (a, b) {
|
||||||
return a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase());
|
return a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase());
|
||||||
};
|
};
|
||||||
|
@ -2668,6 +2669,24 @@ CSL.Engine.prototype.retrieveItem = function (id) {
|
||||||
Item.legislation_id = legislation_id.join("::");
|
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;
|
return Item;
|
||||||
};
|
};
|
||||||
CSL.Engine.prototype.setOpt = function (token, name, value) {
|
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) {
|
for (i = 0, ilen = rule.triggers.length; i < ilen; i += 1) {
|
||||||
if (clonedItem[rule.triggers[i]]) {
|
if (clonedItem[rule.triggers[i]]) {
|
||||||
delete 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";
|
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"];
|
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) {
|
} else if (this.tmp.have_collapsed && this.opt.xclass === "in-text" && this.opt.update_mode !== CSL.NUMERIC) {
|
||||||
this.tmp.splice_delimiter = ", ";
|
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]) {
|
} else if (this.tmp.cite_locales[pos - 1]) {
|
||||||
var alt_affixes = this.tmp.cite_affixes[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) {
|
if (alt_affixes && alt_affixes.delimiter) {
|
||||||
|
@ -4913,8 +4940,10 @@ CSL.Node.citation = {
|
||||||
}
|
}
|
||||||
if (this.tokentype === CSL.END) {
|
if (this.tokentype === CSL.END) {
|
||||||
state.opt.grouped_sort = state.opt.xclass === "in-text"
|
state.opt.grouped_sort = state.opt.xclass === "in-text"
|
||||||
&& state.citation.opt.collapse
|
&& (state.citation.opt.collapse
|
||||||
&& state.citation.opt.collapse.length
|
&& 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.POSITION
|
||||||
&& state.opt.update_mode !== CSL.NUMERIC;
|
&& state.opt.update_mode !== CSL.NUMERIC;
|
||||||
if (state.opt.grouped_sort
|
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])
|
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
|
||||||
&& 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) {
|
if (this.state.tmp.authorstring_request) {
|
||||||
mystr = "";
|
mystr = "";
|
||||||
myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs;
|
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.tmp.offset_characters = oldchars;
|
||||||
this.state.registry.authorstrings[this.Item.id] = mystr;
|
this.state.registry.authorstrings[this.Item.id] = mystr;
|
||||||
} else if (!this.state.tmp.just_looking
|
} 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 = "";
|
mystr = "";
|
||||||
myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs;
|
myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs;
|
||||||
oldchars = this.state.tmp.offset_characters;
|
oldchars = this.state.tmp.offset_characters;
|
||||||
|
@ -6183,9 +6214,14 @@ CSL.NameOutput.prototype._collapseAuthor = function () {
|
||||||
mystr = this.state.output.string(this.state, myqueue, false);
|
mystr = this.state.output.string(this.state, myqueue, false);
|
||||||
}
|
}
|
||||||
if (mystr === this.state.tmp.last_primary_names_string) {
|
if (mystr === this.state.tmp.last_primary_names_string) {
|
||||||
this.state.tmp.name_node.top.blobs.pop();
|
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.children = [];
|
this.state.tmp.name_node.top.blobs.pop();
|
||||||
this.state.tmp.offset_characters = oldchars;
|
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 {
|
} else {
|
||||||
this.state.tmp.last_primary_names_string = mystr;
|
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") {
|
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.term_predecessor = false;
|
||||||
}
|
}
|
||||||
this.state.tmp.have_collapsed = 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;
|
state.build.names_level += -1;
|
||||||
this.label = state.build.name_label;
|
this.label = state.build.name_label;
|
||||||
state.build.name_label = undefined;
|
state.build.name_label = {};
|
||||||
state.build.names_variables.pop();
|
state.build.names_variables.pop();
|
||||||
var mywith = "with";
|
var mywith = "with";
|
||||||
var with_default_prefix = "";
|
var with_default_prefix = "";
|
||||||
|
@ -9270,6 +9309,11 @@ CSL.Attributes["@collapse"] = function (state, arg) {
|
||||||
state[this.name].opt.collapse = 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) {
|
CSL.Attributes["@names-delimiter"] = function (state, arg) {
|
||||||
state.setOpt(this, "names-delimiter", arg);
|
state.setOpt(this, "names-delimiter", arg);
|
||||||
};
|
};
|
||||||
|
@ -9647,9 +9691,6 @@ CSL.Transform = function (state) {
|
||||||
if (["genre", "event", "medium"].indexOf(myabbrev_family) > -1) {
|
if (["genre", "event", "medium"].indexOf(myabbrev_family) > -1) {
|
||||||
myabbrev_family = "title";
|
myabbrev_family = "title";
|
||||||
}
|
}
|
||||||
if (["title-short"].indexOf(myabbrev_family) > -1) {
|
|
||||||
myabbrev_family = "title";
|
|
||||||
}
|
|
||||||
value = "";
|
value = "";
|
||||||
if (state.sys.getAbbreviation) {
|
if (state.sys.getAbbreviation) {
|
||||||
var jurisdiction = state.transform.loadAbbreviation(Item.jurisdiction, myabbrev_family, basevalue);
|
var jurisdiction = state.transform.loadAbbreviation(Item.jurisdiction, myabbrev_family, basevalue);
|
||||||
|
|
|
@ -815,7 +815,7 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If existing value, make sure it's actually changing
|
// If existing value, make sure it's actually changing
|
||||||
if (this._itemData[fieldID] === value) {
|
if ((this._itemData[fieldID] + "") === (value + "")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2923,6 +2923,7 @@ Zotero.Item.prototype.relinkAttachmentFile = function(file, skipItemUpdate) {
|
||||||
this._skipModTimeUpdate = true;
|
this._skipModTimeUpdate = true;
|
||||||
}
|
}
|
||||||
this.save();
|
this.save();
|
||||||
|
this._skipModTimeUpdate = false;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2996,7 +2997,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentLinkMode', function (val) {
|
||||||
+ "' in Zotero.Item.attachmentLinkMode setter");
|
+ "' in Zotero.Item.attachmentLinkMode setter");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val === this._attachmentLinkMode) {
|
if (val === this.attachmentLinkMode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3048,7 +3049,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentMIMEType', function (val) {
|
||||||
val = '';
|
val = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == this._attachmentMIMEType) {
|
if (val == this.attachmentMIMEType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3103,7 +3104,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentCharset', function (val) {
|
||||||
val = null;
|
val = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == this._attachmentCharset) {
|
if (val == this.attachmentCharset) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3151,7 +3152,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentPath', function (val) {
|
||||||
val = '';
|
val = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == this._attachmentPath) {
|
if (val == this.attachmentPath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3209,7 +3210,7 @@ Zotero.Item.prototype.__defineSetter__('attachmentSyncState', function (val) {
|
||||||
+ "' in Zotero.Item.attachmentSyncState setter");
|
+ "' in Zotero.Item.attachmentSyncState setter");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val == this._attachmentSyncState) {
|
if (val == this.attachmentSyncState) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1263,13 +1263,13 @@ Zotero.Sync.Server = new function () {
|
||||||
if (response.firstChild.tagName == 'error') {
|
if (response.firstChild.tagName == 'error') {
|
||||||
if (response.firstChild.getAttribute('code') == 'INVALID_LOGIN') {
|
if (response.firstChild.getAttribute('code') == 'INVALID_LOGIN') {
|
||||||
var e = new Zotero.Error(Zotero.getString('sync.error.invalidLogin'), "INVALID_SYNC_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) {
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
// <response><sessionID>[abcdefg0-9]{32}</sessionID></response>
|
// <response><sessionID>[abcdefg0-9]{32}</sessionID></response>
|
||||||
|
@ -1278,7 +1278,7 @@ Zotero.Sync.Server = new function () {
|
||||||
var re = /^[abcdefg0-9]{32}$/;
|
var re = /^[abcdefg0-9]{32}$/;
|
||||||
if (!re.test(_sessionID)) {
|
if (!re.test(_sessionID)) {
|
||||||
_sessionID = null;
|
_sessionID = null;
|
||||||
_error('Invalid session ID received from server', true);
|
_error('Invalid session ID received from server', false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2584,6 +2584,42 @@ Zotero.Sync.Server.Data = new function() {
|
||||||
|
|
||||||
if (_timeToYield()) yield true;
|
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(*) > 0 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,
|
// Get unmodified creators embedded within items -- this is necessary if, say,
|
||||||
// a creator was deleted locally and appears in a new/modified item remotely
|
// a creator was deleted locally and appears in a new/modified item remotely
|
||||||
var embeddedCreators = {};
|
var embeddedCreators = {};
|
||||||
|
|
|
@ -65,7 +65,7 @@ const CSL_TEXT_MAPPINGS = {
|
||||||
"section":["section"],
|
"section":["section"],
|
||||||
"genre":["type"],
|
"genre":["type"],
|
||||||
"source":["libraryCatalog"],
|
"source":["libraryCatalog"],
|
||||||
"dimension": ["artworkSize", "runningTime"],
|
"dimensions": ["artworkSize", "runningTime"],
|
||||||
"medium":["medium", "system"],
|
"medium":["medium", "system"],
|
||||||
"scale":["scale"],
|
"scale":["scale"],
|
||||||
"archive":["archive"],
|
"archive":["archive"],
|
||||||
|
|
|
@ -35,7 +35,7 @@ const ZOTERO_CONFIG = {
|
||||||
API_URL: 'https://api.zotero.org/',
|
API_URL: 'https://api.zotero.org/',
|
||||||
PREF_BRANCH: 'extensions.zotero.',
|
PREF_BRANCH: 'extensions.zotero.',
|
||||||
BOOKMARKLET_URL: 'https://www.zotero.org/bookmarklet/',
|
BOOKMARKLET_URL: 'https://www.zotero.org/bookmarklet/',
|
||||||
VERSION: "3.0.9.SOURCE"
|
VERSION: "3.0.10.SOURCE"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Commonly used imports accessible anywhere
|
// Commonly used imports accessible anywhere
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<!ENTITY quitApplicationCmd.accesskey "Q">
|
<!ENTITY quitApplicationCmd.accesskey "Q">
|
||||||
|
|
||||||
|
|
||||||
<!ENTITY editMenu.label "退出">
|
<!ENTITY editMenu.label "编辑">
|
||||||
<!ENTITY editMenu.accesskey "E">
|
<!ENTITY editMenu.accesskey "E">
|
||||||
<!ENTITY undoCmd.label "撤销">
|
<!ENTITY undoCmd.label "撤销">
|
||||||
<!ENTITY undoCmd.key "Z">
|
<!ENTITY undoCmd.key "Z">
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
|
|
||||||
<em:id>zotero@chnm.gmu.edu</em:id>
|
<em:id>zotero@chnm.gmu.edu</em:id>
|
||||||
<em:name>Zotero</em:name>
|
<em:name>Zotero</em:name>
|
||||||
|
<<<<<<< HEAD
|
||||||
<em:version>3.5a1.SOURCE</em:version>
|
<em:version>3.5a1.SOURCE</em:version>
|
||||||
|
=======
|
||||||
|
<em:version>3.0.10.SOURCE</em:version>
|
||||||
|
>>>>>>> 3.0
|
||||||
<em:creator>Center for History and New Media<br/>George Mason University</em:creator>
|
<em:creator>Center for History and New Media<br/>George Mason University</em:creator>
|
||||||
<em:contributor>Dan Cohen</em:contributor>
|
<em:contributor>Dan Cohen</em:contributor>
|
||||||
<em:contributor>Sean Takats</em:contributor>
|
<em:contributor>Sean Takats</em:contributor>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2012-11-06 16:30:00
|
2012-11-18 22:15:00
|
||||||
|
|
2
styles
2
styles
|
@ -1 +1 @@
|
||||||
Subproject commit 1e8b58267ae7e6025e2f3bd5c0d55f73a37f30f3
|
Subproject commit 90265e1171d5f7e597984d9a7ff90c6f55e7cac3
|
|
@ -1 +1 @@
|
||||||
Subproject commit fc00df4eec4c4b9fa3d1e52d17eb46ff0cdfb50a
|
Subproject commit 14794d840b2476cca38cbcd7f17d8c3952a4536d
|
Loading…
Add table
Add a link
Reference in a new issue