From cf5d3a08bff923eb839ec4d2888fd785a60aa348 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 21 May 2013 21:55:49 -0500 Subject: [PATCH 01/45] Add callback to importFromURL for drag-dropped PDFs instead of setTimeout --- chrome/content/zotero/zoteroPane.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 558a019003..b36041183e 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3283,16 +3283,12 @@ var ZoteroPane = new function() var collectionID = false; } - var attachmentItem = Zotero.Attachments.importFromURL(url, false, false, false, collectionID, mimeType, libraryID); - - // importFromURL() doesn't trigger the notifier until - // after download is complete - // - // TODO: add a callback to importFromURL() - setTimeout(function () { - self.selectItem(attachmentItem.id); - }, 1001); - + var attachmentItem = Zotero.Attachments.importFromURL(url, false, + false, false, collectionID, mimeType, libraryID, + function(attachmentItem) { + self.selectItem(attachmentItem.id); + }); + return; } } From 01631d6c9d3ab93b2085e9e52e3e8632a91feebc Mon Sep 17 00:00:00 2001 From: aurimasv Date: Mon, 17 Feb 2014 20:37:11 -0600 Subject: [PATCH 02/45] Fix some bugs with charset encoding on import --- .../xpcom/translation/translate_firefox.js | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index 44b04702b3..45ae76db2f 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -535,7 +535,8 @@ Zotero.Translate.IO.Read = function(file, mode) { this._openRawStream(); // start detecting charset - var charset = null; + this._charset = null; + this._bomLength = 0; // look for a BOM in the document var binStream = Components.classes["@mozilla.org/binaryinputstream;1"]. @@ -551,14 +552,13 @@ Zotero.Translate.IO.Read = function(file, mode) { } if(this._charset) { + Zotero.debug("Translate: Found BOM. Setting character encoding to " + this._charset); // BOM found; store its length and go back to the beginning of the file this._bomLength = BOMs[this._charset].length; - this._rawStream.QueryInterface(Components.interfaces.nsISeekableStream) - .seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET, this._bomLength); } else { - // look for an XML parse instruction - this._bomLength = 0; + this._rewind(); + // look for an XML parse instruction var sStream = Components.classes["@mozilla.org/scriptableinputstream;1"] .createInstance(Components.interfaces.nsIScriptableInputStream); sStream.init(this._rawStream); @@ -591,17 +591,21 @@ Zotero.Translate.IO.Read = function(file, mode) { } catch(e) {} } - // if we know for certain document is XML, we also know for certain that the - // default charset for XML is UTF-8 - if(!this._charset) this._charset = "UTF-8"; + if(this._charset) { + Zotero.debug("Translate: Found XML parse instruction. Setting character encoding to " + this._charset); + } else { + // if we know for certain document is XML, we also know for certain that the + // default charset for XML is UTF-8 + this._charset = "UTF-8"; + Zotero.debug("Translate: XML parse instruction not found. Defaulting to UTF-8 for XML files"); + } } } // If we managed to get a charset here, then translators shouldn't be able to override it, // since it's almost certainly correct. Otherwise, we allow override. - this._allowCharsetOverride = !!this._charset; - this._rawStream.QueryInterface(Components.interfaces.nsISeekableStream) - .seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET, this._bomLength); + this._allowCharsetOverride = !this._charset; + this._rewind(); if(!this._charset) { // No XML parse instruction or BOM. @@ -668,6 +672,7 @@ Zotero.Translate.IO.Read = function(file, mode) { break; } } + this._rewind(); } else { // No need to auto-detect; user has specified a charset this._charset = charsetPref; @@ -693,13 +698,18 @@ Zotero.Translate.IO.Read.prototype = { this._rawStream.init(this.file, 0x01, 0664, 0); }, - "_seekToStart":function(charset) { - this._openRawStream(); - + "_rewind":function() { this._linesExhausted = false; this._rawStream.QueryInterface(Components.interfaces.nsISeekableStream) .seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET, this._bomLength); + this._rawStream.QueryInterface(Components.interfaces.nsIFileInputStream); this.bytesRead = this._bomLength; + }, + + "_seekToStart":function(charset) { + this._openRawStream(); + + this._rewind(); this.inputStream = Components.classes["@mozilla.org/intl/converter-input-stream;1"] .createInstance(Components.interfaces.nsIConverterInputStream); @@ -747,10 +757,10 @@ Zotero.Translate.IO.Read.prototype = { } // seek back to the beginning - this._seekToStart(this._allowCharsetOverride ? this._allowCharsetOverride : this._charset); + this._seekToStart(this._allowCharsetOverride ? charset : this._charset); - if(!_allowCharsetOverride) { - Zotero.debug("Translate: setCharacterSet: translate charset override ignored due to BOM or XML parse instruction"); + if(!this._allowCharsetOverride) { + Zotero.debug("Translate: setCharacterSet: translate charset override ignored due to BOM or XML parse instruction. Using " + this._charset); } }, From 1390b1300a11f8867b997b058b45acda5248bed6 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Thu, 6 Mar 2014 07:00:44 -0600 Subject: [PATCH 03/45] [RDF] QNAME fixes * Allow periods in QNAMEs * Don't break when there are illegal characters in the predicate. Use the strategy proposed at http://www.w3.org/TR/2014/REC-rdf-syntax-grammar-20140225/#section-Serialising (generate namespace that consumes all illegal characters) * More robust namespace name generation Closes #128 --- chrome/content/zotero/xpcom/rdf/serialize.js | 66 +++++++++++--------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/chrome/content/zotero/xpcom/rdf/serialize.js b/chrome/content/zotero/xpcom/rdf/serialize.js index aa053ed1ea..472d7de7a5 100644 --- a/chrome/content/zotero/xpcom/rdf/serialize.js +++ b/chrome/content/zotero/xpcom/rdf/serialize.js @@ -90,23 +90,33 @@ $rdf.Serializer = function () { for(var ns in sz.prefixes) { namespaces[sz.prefixes[ns]] = ns; // reverse index } - if('#/'.indexOf(p[p.length - 1]) >= 0) p = p.slice(0, -1); - var slash = p.lastIndexOf('/'); - if(slash >= 0) p = p.slice(slash + 1); - var i = 0; - while(i < p.length) - if(sz.prefixchars.indexOf(p[i])) + // trim off illegal characters from the end + var i; + for(i = p.length - 1; i>=0; i--) { + if(sz._notNameChars.indexOf(p.charAt(i)) == -1) break; + } + p = p.substring(0, i+1); + if(p) { + // find shortest possible NCName to use as namespace name + for(i = p.length - 1; i>=0; i--) { + if(sz._notNameChars.indexOf(p.charAt(i)) != -1) break; + } i++; - else - break; - p = p.slice(0, i); - if(p.length < 6 && canUse(p)) return pok; // exact i sbest - if(canUse(p.slice(0, 3))) return pok; - if(canUse(p.slice(0, 2))) return pok; - if(canUse(p.slice(0, 4))) return pok; - if(canUse(p.slice(0, 1))) return pok; - if(canUse(p.slice(0, 5))) return pok; - for(var i = 0;; i++) if(canUse(p.slice(0, 3) + i)) return pok; + p = p.substr(i); + + if(p.length < 6 && canUse(p)) return pok; // exact is best + if(canUse(p.slice(0, 3))) return pok; + if(canUse(p.slice(0, 2))) return pok; + if(canUse(p.slice(0, 4))) return pok; + if(canUse(p.slice(0, 1))) return pok; + if(canUse(p.slice(0, 5))) return pok; + p = p.slice(0, 3); + } else { + // no suitable characters (weird), fall back to 'ns' + p = 'ns'; + if(canUse(p)) return pok; + } + for(var i = 0;; i++) if(canUse(p + i)) return pok; } @@ -267,8 +277,13 @@ $rdf.Serializer = function () { return this.statementsToN3(f.statements); } - __Serializer.prototype._notQNameChars = "\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~"; + __Serializer.prototype._notQNameChars = "\t\r\n !\"#$%&'()*,+/;<=>?@[\\]^`{|}~"; __Serializer.prototype._notNameChars = (__Serializer.prototype._notQNameChars + ":"); + __Serializer.prototype._NCNameRegExp = (function() { + // escape characters that are unsafe inside RegExp character set + var reSafeChars = __Serializer.prototype._notNameChars.replace(/[-\]\\]/g, '\\$&'); + return new RegExp('[^0-9\\-.' + reSafeChars + '][^' + reSafeChars + ']*$'); + })(); __Serializer.prototype.statementsToN3 = function (sts) { @@ -822,20 +837,11 @@ $rdf.Serializer = function () { function qname(term) { var uri = term.uri; - var j = uri.indexOf('#'); - if(j < 0 && sz.flags.indexOf('/') < 0) { - j = uri.lastIndexOf('/'); - } + var j = uri.search(sz._NCNameRegExp); if(j < 0) throw("Cannot make qname out of <" + uri + ">") - - var canSplit = true; - for(var k = j + 1; k < uri.length; k++) { - if(__Serializer.prototype._notNameChars.indexOf(uri[k]) >= 0) { - throw('Invalid character "' + uri[k] + '" cannot be in XML qname for URI: ' + uri); - } - } - var localid = uri.slice(j + 1); - var namesp = uri.slice(0, j + 1); + + var localid = uri.substr(j); + var namesp = uri.substr(0, j); if(sz.defaultNamespace && sz.defaultNamespace == namesp && sz.flags.indexOf('d') < 0) { // d -> suppress default From 2305023c5d000f902e6ddaa3c67e10c0d17103ea Mon Sep 17 00:00:00 2001 From: aurimasv Date: Thu, 17 Apr 2014 15:59:41 -0500 Subject: [PATCH 04/45] For detectWeb, ignore translators targeting iframes with same URL Addresses https://forums.zotero.org/discussion/36104/wall-street-journal-translator-not-working/ --- chrome/content/zotero/browser.js | 12 ++++++++++-- chrome/content/zotero/xpcom/utilities_internal.js | 13 +++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index d667eb9484..a7ff51faa0 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -812,8 +812,10 @@ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, transla //and the page is still there && this.page.document.defaultView && !this.page.document.defaultView.closed //this set of translators is not targeting the same URL as a previous set of translators, - // because otherwise we want to use the newer set - && this.page.document.location.href != translate.document.location.href + // because otherwise we want to use the newer set, + // but only if it's not in a subframe of the previous set + && (this.page.document.location.href != translate.document.location.href || + Zotero.Utilities.Internal.isIframeOf(translate.document.defaultView, this.page.document.defaultView)) //the best translator we had was of higher priority than the new set && (this.page.translators[0].priority < translators[0].priority //or the priority was the same, but... @@ -823,11 +825,15 @@ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, transla || translate.document.defaultView !== this.page.document.defaultView.top) )) ) { + Zotero.debug("Translate: a better translator was already found for this page"); return; //keep what we had } else { this.clear(); //clear URL bar icon } + Zotero.debug("Translate: found translators for page\n" + + "Best translator: " + translators[0].label + " with priority " + translators[0].priority); + this.page.translate = translate; this.page.translators = translators; this.page.document = translate.document; @@ -839,6 +845,8 @@ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, transla this._attemptLocalFileImport(translate.document); } + if(!translators || !translators.length) Zotero.debug("Translate: No translators found"); + Zotero_Browser.updateStatus(); } diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index af9ed28d2a..0d699639e7 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -301,6 +301,19 @@ Zotero.Utilities.Internal = { return null; } return str; + }, + + /** + * Determine if one Window is a descendant of another Window + * @param {DOMWindow} suspected child window + * @param {DOMWindow} suspected parent window + * @return {boolean} + */ + "isIframeOf":function isIframeOf(childWindow, parentWindow) { + while(childWindow.parent !== childWindow) { + childWindow = childWindow.parent; + if(childWindow === parentWindow) return true; + } } } From fb8d6121bb66c2dfb418d9d6863c054ace846cba Mon Sep 17 00:00:00 2001 From: adam3smith Date: Sun, 20 Apr 2014 23:19:06 -0600 Subject: [PATCH 05/45] add COinS export support for all item types via DC --- chrome/content/zotero/xpcom/openurl.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/openurl.js b/chrome/content/zotero/xpcom/openurl.js index 7291b940c0..a00296f4e9 100644 --- a/chrome/content/zotero/xpcom/openurl.js +++ b/chrome/content/zotero/xpcom/openurl.js @@ -184,7 +184,28 @@ Zotero.OpenURL = new function() { _mapTag(Zotero.Date.strToISO(item.issueDate), "date"); } } else { - return false; + //we map as much as possible to DC for all other types. This will export some info + //and work very nicely on roundtrip. All of these fields legal for mtx:dc according to + //http://alcme.oclc.org/openurl/servlet/OAIHandler/extension?verb=GetMetadata&metadataPrefix=mtx&identifier=info:ofi/fmt:kev:mtx:dc + _mapTag("info:ofi/fmt:kev:mtx:dc", "rft_val_fmt", true); + _mapTag(item.itemType, "type"); + if(item.title) _mapTag(item.title, "title"); + if(item.publicationTitle) _mapTag(item.publicationTitle, "source"); + if(item.rights) _mapTag(item.rights, "rights"); + if(item.publisher) _mapTag(item.publisher, "publisher"); + if(item.abstractNote) _mapTag(item.abstractNote, "description"); + if(item.ISBN){ + _mapTag("ISBN " + item.ISBN, "identifier"); + } + else if(item.ISSN){ + _mapTag("ISSN " + item.ISSN, "identifier"); + } + else if(item.DOI){ + _mapTag("urn::doi:" + item.DOI, "identifier"); + } + else if(item.url){ + _mapTag(item.url, "identifier"); + } } if(item.creators && item.creators.length) { @@ -223,7 +244,7 @@ Zotero.OpenURL = new function() { if(item.numPages) _mapTag(item.numPages, "tpages"); if(item.ISBN) _mapTag(item.ISBN, "isbn"); if(item.ISSN) _mapTag(item.ISSN, "issn"); - + if(item.language) _mapTag(item.language, "language"); if(asObj) return entries; return entries.join("&"); } From 56cdcb0524d913ab9d648718a0a22452f44a9926 Mon Sep 17 00:00:00 2001 From: adam3smith Date: Mon, 21 Apr 2014 11:43:28 -0600 Subject: [PATCH 06/45] remove unnecessary if statements and some clean-up. Don't put ISBN and ISSN into DC.identifier, since they're being added to all items as issn and isbn anyways. --- chrome/content/zotero/xpcom/openurl.js | 75 ++++++++++++-------------- 1 file changed, 35 insertions(+), 40 deletions(-) diff --git a/chrome/content/zotero/xpcom/openurl.js b/chrome/content/zotero/xpcom/openurl.js index a00296f4e9..d281562753 100644 --- a/chrome/content/zotero/xpcom/openurl.js +++ b/chrome/content/zotero/xpcom/openurl.js @@ -136,11 +136,11 @@ Zotero.OpenURL = new function() { } _mapTag("article", "genre"); - if(item.title) _mapTag(item.title, "atitle") - if(item.publicationTitle) _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "jtitle")) - if(item.journalAbbreviation) _mapTag(item.journalAbbreviation, "stitle"); - if(item.volume) _mapTag(item.volume, "volume"); - if(item.issue) _mapTag(item.issue, "issue"); + _mapTag(item.title, "atitle"); + _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "jtitle")); + _mapTag(item.journalAbbreviation, "stitle"); + _mapTag(item.volume, "volume"); + _mapTag(item.issue, "issue"); } else if(item.itemType == "book" || item.itemType == "bookSection" || item.itemType == "conferencePaper" || item.itemType == "report") { if(version === "1.0") { _mapTag("info:ofi/fmt:kev:mtx:book", "rft_val_fmt", true); @@ -148,37 +148,37 @@ Zotero.OpenURL = new function() { if(item.itemType == "book") { _mapTag("book", "genre"); - if(item.title) _mapTag(item.title, (version == "0.1" ? "title" : "btitle")); + _mapTag(item.title, (version == "0.1" ? "title" : "btitle")); } else if (item.itemType == "conferencePaper") { _mapTag("proceeding", "genre"); - if(item.title) _mapTag(item.title, "atitle") - if(item.proceedingsTitle) _mapTag(item.proceedingsTitle, (version == "0.1" ? "title" : "btitle")); + _mapTag(item.title, "atitle"); + _mapTag(item.proceedingsTitle, (version == "0.1" ? "title" : "btitle")); } else if (item.itemType == "report") { _mapTag("report", "genre"); - if(item.seriesTitle) _mapTag(item.seriesTitle, "series"); - if(item.title) _mapTag(item.title, (version == "0.1" ? "title" : "btitle")); + _mapTag(item.seriesTitle, "series"); + _mapTag(item.title, (version == "0.1" ? "title" : "btitle")); } else { _mapTag("bookitem", "genre"); - if(item.title) _mapTag(item.title, "atitle") - if(item.publicationTitle) _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "btitle")); + _mapTag(item.title, "atitle"); + _mapTag(item.publicationTitle, (version == "0.1" ? "title" : "btitle")); } - if(item.place) _mapTag(item.place, "place"); - if(item.publisher) _mapTag(item.publisher, "publisher") - if(item.edition) _mapTag(item.edition, "edition"); - if(item.series) _mapTag(item.series, "series"); + _mapTag(item.place, "place"); + _mapTag(item.publisher, "publisher"); + _mapTag(item.edition, "edition"); + _mapTag(item.series, "series"); } else if(item.itemType == "thesis" && version == "1.0") { _mapTag("info:ofi/fmt:kev:mtx:dissertation", "rft_val_fmt", true); - if(item.title) _mapTag(item.title, "title"); - if(item.publisher) _mapTag(item.publisher, "inst"); - if(item.type) _mapTag(item.type, "degree"); + _mapTag(item.title, "title"); + _mapTag(item.publisher, "inst"); + _mapTag(item.type, "degree"); } else if(item.itemType == "patent" && version == "1.0") { _mapTag("info:ofi/fmt:kev:mtx:patent", "rft_val_fmt", true); - if(item.title) _mapTag(item.title, "title"); - if(item.assignee) _mapTag(item.assignee, "assignee"); - if(item.patentNumber) _mapTag(item.patentNumber, "number"); + _mapTag(item.title, "title"); + _mapTag(item.assignee, "assignee"); + _mapTag(item.patentNumber, "number"); if(item.issueDate) { _mapTag(Zotero.Date.strToISO(item.issueDate), "date"); @@ -188,23 +188,18 @@ Zotero.OpenURL = new function() { //and work very nicely on roundtrip. All of these fields legal for mtx:dc according to //http://alcme.oclc.org/openurl/servlet/OAIHandler/extension?verb=GetMetadata&metadataPrefix=mtx&identifier=info:ofi/fmt:kev:mtx:dc _mapTag("info:ofi/fmt:kev:mtx:dc", "rft_val_fmt", true); + //lacking something better we use Zotero item types here; no clear alternative and this works for roundtrip _mapTag(item.itemType, "type"); - if(item.title) _mapTag(item.title, "title"); - if(item.publicationTitle) _mapTag(item.publicationTitle, "source"); - if(item.rights) _mapTag(item.rights, "rights"); - if(item.publisher) _mapTag(item.publisher, "publisher"); - if(item.abstractNote) _mapTag(item.abstractNote, "description"); - if(item.ISBN){ - _mapTag("ISBN " + item.ISBN, "identifier"); - } - else if(item.ISSN){ - _mapTag("ISSN " + item.ISSN, "identifier"); - } - else if(item.DOI){ - _mapTag("urn::doi:" + item.DOI, "identifier"); + _mapTag(item.title, "title"); + _mapTag(item.publicationTitle, "source"); + _mapTag(item.rights, "rights"); + _mapTag(item.publisher, "publisher"); + _mapTag(item.abstractNote, "description"); + if(item.DOI){ + _mapTag("urn:doi:" + item.DOI, "identifier"); } else if(item.url){ - _mapTag(item.url, "identifier"); + _mapTag(item.url, "identifier"); } } @@ -241,10 +236,10 @@ Zotero.OpenURL = new function() { if(pages.length >= 2) _mapTag(pages[1], "epage"); } } - if(item.numPages) _mapTag(item.numPages, "tpages"); - if(item.ISBN) _mapTag(item.ISBN, "isbn"); - if(item.ISSN) _mapTag(item.ISSN, "issn"); - if(item.language) _mapTag(item.language, "language"); + _mapTag(item.numPages, "tpages"); + _mapTag(item.ISBN, "isbn"); + _mapTag(item.ISSN, "issn"); + _mapTag(item.language, "language"); if(asObj) return entries; return entries.join("&"); } From 35fe6490feb38d80c3322b89591c9021181ea700 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 27 Apr 2014 20:29:22 -0400 Subject: [PATCH 07/45] Fix lookup box sizing on subsequent opens --- chrome/content/zotero/lookup.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js index 6fc52b44dd..a877b3b169 100644 --- a/chrome/content/zotero/lookup.js +++ b/chrome/content/zotero/lookup.js @@ -225,6 +225,12 @@ const Zotero_Lookup = new function () { //switch textboxes mlPanel.setAttribute("collapsed", !on); slPanel.setAttribute("collapsed", !!on); + + // Resize arrow box to fit content + var panel = document.getElementById("zotero-lookup-panel"); + var box = panel.firstChild; + panel.sizeTo(box.scrollWidth, box.scrollHeight); + dest.focus(); return dest; } From 6bed65941a76cd1a02f8a4aa79037164224ad16d Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 14 Aug 2013 16:31:19 -0400 Subject: [PATCH 08/45] Create README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..20183b735d --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Zotero +====== + +Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. + +For more information on how to use this source code, see the [Zotero wiki](http://www.zotero.org/support/dev/source_code). From 4179cb8ed6cec71bd3b064fa639440c228d0b1e9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 28 Apr 2014 03:52:18 -0400 Subject: [PATCH 09/45] Retina tree twisties for OS X Using separate arrows from treetwisty.svg from Mozilla, since it doesn't seem to be possible to use list-style-position in the tree The reason we still have to do this at all is that coloring of the twisties in the tree still gets messed up as you move around the tree. (This still happens in Places and Thunderbird as well.) --- .../content/zotero-platform/mac/overlay.css | 26 ++++++++---------- .../default/zotero/mac/twisty-active-open.png | Bin 1046 -> 0 bytes .../default/zotero/mac/twisty-active-open.svg | 15 ++++++++++ .../skin/default/zotero/mac/twisty-active.png | Bin 1125 -> 0 bytes .../skin/default/zotero/mac/twisty-active.svg | 12 ++++++++ .../skin/default/zotero/mac/twisty-open.png | Bin 1043 -> 0 bytes .../skin/default/zotero/mac/twisty-open.svg | 11 ++++++++ .../mac/twisty-selected-active-open.svg | 12 ++++++++ .../zotero/mac/twisty-selected-active.svg | 12 ++++++++ .../zotero/mac/twisty-selected-open.png | Bin 1093 -> 0 bytes .../zotero/mac/twisty-selected-open.svg | 12 ++++++++ .../default/zotero/mac/twisty-selected.png | Bin 1104 -> 0 bytes .../default/zotero/mac/twisty-selected.svg | 12 ++++++++ chrome/skin/default/zotero/mac/twisty.png | Bin 1060 -> 0 bytes chrome/skin/default/zotero/mac/twisty.svg | 12 ++++++++ 15 files changed, 110 insertions(+), 14 deletions(-) delete mode 100644 chrome/skin/default/zotero/mac/twisty-active-open.png create mode 100644 chrome/skin/default/zotero/mac/twisty-active-open.svg delete mode 100644 chrome/skin/default/zotero/mac/twisty-active.png create mode 100644 chrome/skin/default/zotero/mac/twisty-active.svg delete mode 100644 chrome/skin/default/zotero/mac/twisty-open.png create mode 100644 chrome/skin/default/zotero/mac/twisty-open.svg create mode 100644 chrome/skin/default/zotero/mac/twisty-selected-active-open.svg create mode 100644 chrome/skin/default/zotero/mac/twisty-selected-active.svg delete mode 100644 chrome/skin/default/zotero/mac/twisty-selected-open.png create mode 100644 chrome/skin/default/zotero/mac/twisty-selected-open.svg delete mode 100644 chrome/skin/default/zotero/mac/twisty-selected.png create mode 100644 chrome/skin/default/zotero/mac/twisty-selected.svg delete mode 100644 chrome/skin/default/zotero/mac/twisty.png create mode 100644 chrome/skin/default/zotero/mac/twisty.svg diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css index e1cd1e9801..7d9898d854 100644 --- a/chrome/content/zotero-platform/mac/overlay.css +++ b/chrome/content/zotero-platform/mac/overlay.css @@ -190,13 +190,11 @@ } #zotero-collections-tree treechildren::-moz-tree-twisty(selected) { - -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-selected.png"); + list-style-image: url("chrome://zotero/skin/mac/twisty-selected.svg"); } #zotero-collections-tree treechildren::-moz-tree-twisty(selected, open) { - -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-selected-open.png"); + list-style-image: url("chrome://zotero/skin/mac/twisty-selected-open.svg"); } #zotero-collections-splitter, #zotero-items-splitter @@ -272,18 +270,18 @@ treechildren::-moz-tree-twisty { -moz-appearance: none; - width: 11px; - height: 11px; - list-style-image: url("chrome://zotero/skin/mac/twisty.png"); + width: 16px; + height: 16px; + list-style-image: url("chrome://zotero/skin/mac/twisty.svg"); -moz-padding-start: 5px; -moz-padding-end: 6px; } treechildren::-moz-tree-twisty(open) { -moz-appearance: none; - width: 11px; - height: 11px; - list-style-image: url("chrome://zotero/skin/mac/twisty-open.png"); + width: 16px; + height: 16px; + list-style-image: url("chrome://zotero/skin/mac/twisty-open.svg"); -moz-padding-start: 4px; -moz-padding-end: 7px; } @@ -291,23 +289,23 @@ treechildren::-moz-tree-twisty(open) { /* How to get active twisty? treechildren::-moz-tree-twisty(active) { -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-active.png") !important; + list-style-image: url("chrome://zotero/skin/mac/twisty-active.svg") !important; } treechilren::-moz-tree-twisty(active) { -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-active-open.png"); + list-style-image: url("chrome://zotero/skin/mac/twisty-active-open.svg"); } */ tree:focus treechildren::-moz-tree-twisty(selected) { -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-selected.png"); + list-style-image: url("chrome://zotero/skin/mac/twisty-selected.svg"); } tree:focus treechildren::-moz-tree-twisty(selected, open) { -moz-appearance: none; - list-style-image: url("chrome://zotero/skin/mac/twisty-selected-open.png"); + list-style-image: url("chrome://zotero/skin/mac/twisty-selected-open.svg"); } treechildren::-moz-tree-image { diff --git a/chrome/skin/default/zotero/mac/twisty-active-open.png b/chrome/skin/default/zotero/mac/twisty-active-open.png deleted file mode 100644 index c5b13ed047280372776f8fbfdaa8a53b1f4b59c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1046 zcmaJ=Pe>F|93Ig&)1;ul41~u>hoaq?*-^J0+?L&)U0rZwS(jQmH9PZkC!KlI%+pj7%TZAR)Ef8YzhpM z%jG;d-h-?`hV%RVj)vFkCJ47ZW?(t*Hte>tf(UKJ(oC!&12~Fu294kVO(NY(K{qS1 zhFvNXDHxNNO@{NZPD*8f+%>lL((lW;%Ye+t{FF%vRLXrmEJA&nbob6lB1#DX$L zRtllvaupL1&^kw0?)VeJQrrUSlG{T zQ8pZndZXc3_*^6ui$p`AGFL>(hz<>0=BoQ#t}53V1>Gc`MQCZGP>oqg2gQ^Ht!gZx zXjQ!uSFIXLC{~rrkYE_6v41tXd_|_mIabD&7?r_?2AOt?jP + + + + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-active.png b/chrome/skin/default/zotero/mac/twisty-active.png deleted file mode 100644 index daaa60fe3ac8f5b3c941d55c86a1e6ff746d8e20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1125 zcmbVLOK1~87~Wd7S`oF-gAZ_A#eAu_pVd0aHU7v?7#lb|>x9?#{Y9HEBVp zrG*L}JSZN#>p}D;9#mAQ)}r9W2k6C0u2oPJw6=9NZK{V-!G+zKfA;&n|1tl6A=B2n zv3^@UMNu15N0lsD*OPa{y0zqc>(q_yWZ8<<4&06kxTt%ON|-1QLCV&vx8=m?&-WhEz%t|X$!MBOyE5#t zjt+XTeXuQO4E7o^lWsW-noAN9up!n#$?kJ}sT8Lxx)Rw3$1Dvh5ZoK57lP_YXMl`6 z2%-!ZGPouVH1P}{j)>c-!sU46n0n1q;@Mi3V9}W+OVRrjWc1t6!6_w9lRu1UnUZ!;)OcQuaH7C99pp*+5n1KANLUD~N+Oo5YAnZ< zV*;;6qB5@~2~*{gsw${SV#osiQFfu401nwp1fP^qtEE#qHP{+0Iv*ZiNFu_PEaXpX;{ zrFujg7s7i%_k z)ofuq?_XNIZ*G(6tp51x+|2j5a$@ zYinx(%+_5yJvTcu@o0R!JTWry;NNdZfes|~Qwb9WvQ-}5py)JgC q4Gj%1uZB+V9ev)ZWyTs-Q8jC+v1i&;%j2iR!QiLVHsyA*Yxp-fNO7P5 diff --git a/chrome/skin/default/zotero/mac/twisty-active.svg b/chrome/skin/default/zotero/mac/twisty-active.svg new file mode 100644 index 0000000000..cb6d6f1318 --- /dev/null +++ b/chrome/skin/default/zotero/mac/twisty-active.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-open.png b/chrome/skin/default/zotero/mac/twisty-open.png deleted file mode 100644 index ec9b5ef05c8b0ff2ab17d15b399148b6fcfa0388..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1043 zcmah|O;6N77;ZuWh@yBfh|y$H3>V$)wB65!6?V5>SVIX}*0}K^-FB93pdYq_TTl}q zD)HjM8~y;oMGqc~i3bjb5DkeQ(1SOLM-n)o7ZIE;yI>5#CexXB@;vYRydU#qXt1xf z(T)mjKy1uvEaqRtZ-W2T@7QDk6|Ilu?vJiZ*%YJ?f^Y z23pS-a6ujrRLck|J|^fHHepj#caLW)>KMYHh(>iYL2tfYqJgd@=$l~~%61x+_5LXb z4Nnc`)u}NxuF*Z$K({9l2L{3l@QiWO6}$vp^(&CGf6dUK3c+IudS6sQ9s+60K_DE2 z0To6dh_FGH4@INVtAK+nWFW_|T!4)VJSRX1Y9CFaIa*1`iJ4j~VkPJ@#%tN9F_E=)LAE!+8rOr2NE@cXsHth zGI3T+(Bvkl>6#$%$yhR-jIxcNwIhm*11{J#fqt-I#)mBMvmnQ zX$L9Ta`KinUhm#e*}|4vwrr3d4g*!AJT!x5Y{Ko#(==v3z9{+eSw!}CXd}NYo zcgR>TiX z&vku#c=`3&xm#~yuh#E_-I;~0ru@Yl?5Bn^GxxpAd; zA<}kRmgUb%F;#fFajJ1q6xOD(_GpB9*1N)&R=1YBPPdIvYsKr8t{3eO{AZe#2E~`D Gk=Z{>nos`# diff --git a/chrome/skin/default/zotero/mac/twisty-open.svg b/chrome/skin/default/zotero/mac/twisty-open.svg new file mode 100644 index 0000000000..0d3f7419d6 --- /dev/null +++ b/chrome/skin/default/zotero/mac/twisty-open.svg @@ -0,0 +1,11 @@ + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-selected-active-open.svg b/chrome/skin/default/zotero/mac/twisty-selected-active-open.svg new file mode 100644 index 0000000000..ebe88deb23 --- /dev/null +++ b/chrome/skin/default/zotero/mac/twisty-selected-active-open.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-selected-active.svg b/chrome/skin/default/zotero/mac/twisty-selected-active.svg new file mode 100644 index 0000000000..7a1c7992a8 --- /dev/null +++ b/chrome/skin/default/zotero/mac/twisty-selected-active.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-selected-open.png b/chrome/skin/default/zotero/mac/twisty-selected-open.png deleted file mode 100644 index 484aa8f6252de5832105c14ceadd3e2e66f51d84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1093 zcmbVLJ8aWX6m>zWN=Z<+s!*YayOQ|X`8Y8RRs0D})s!d=BH~lkwO<;m^{4g=NxDE$ zJ5;C(6H;M9to%g9z|a8}Ht0Zs8L2R!A_mxi=X^?siUCXZd-wUCbI-l+-qrlXxnS?{ zUW%fE*-^Pb)}!P-($h`8pY(SjvJ7CQgeUDXuBk4f(z-o^K-N@eQ30uXW8pO#rl`YZ zqgcYF+_<3GW?1!o!gbRjXo?yhsXMARhcK8yvxb$TcVBGMz|d3l#aIsJ90^s7(M10A+#W^jh(<5iWa9tn-Cc-MHoAZ_@)KhemS0H=;n4v+_1<$4EmZ(xL4+rX7n|DY}BOBQQ*@Rtwi6 zVcVT$*km&4b8uXUc!a!$h1Gh<@`gGLGV(OnaIj%pz-Lrv>?%&tL}@Dp)5+!bh%K*O zC{i+}t~v}GhKykwQurM0oB8r?&iXD!Fuu_s^m1rEY z8Id3rC@Ko4h{TZ68A(Z}JJ_t{Vb#)5C$2%_wy?3xKe2-3A{Enj)s#D`o0?$0}+5Gj%@a$+&SRW&Q8i}jDoYj1-$KtR4czBAod zb_Tn>{%)|)b3M8dyU=xNsxY=YbxAMx<-R?7`DNXkdhqrB)4@DHL_fawIs5&VxAHvj zetWZj>}TP`_ST1yD~+qao-An_&z4t5cl7D4M$h^{;Mm&lmC&6tC+{8#P{CJAYd>yp QzVQb;t4zob#p#=W05gVNfB*mh diff --git a/chrome/skin/default/zotero/mac/twisty-selected-open.svg b/chrome/skin/default/zotero/mac/twisty-selected-open.svg new file mode 100644 index 0000000000..827272d266 --- /dev/null +++ b/chrome/skin/default/zotero/mac/twisty-selected-open.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty-selected.png b/chrome/skin/default/zotero/mac/twisty-selected.png deleted file mode 100644 index b7d58a4ee171eb985716de5cd47f206909011f7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1104 zcmbVLO-$2J9B+ajFd^!J1k{*P)JSyeYdhH1Fk$_IsY5cB2nQ2O`^Fk*Uu_?5kQf#@ z5E3|hB^>mmk(<#2m@FnFdM94=i19$wiy9Mr9UF2W9Bk6QkN$qY|M%kX&_GM*T!^Bm zmh_;KC2JFTPc@z(-{)h`&Xc7btD|@X<#AE>AeA!FIHc3IJ^`~(H)kGf!d{AM$XmHl zJes*J8pw|50VYziUBafQ-oBEn8neWkuaIQ8+30;Bmy?XI$g4-9A7LYnX0Zx_Q5sF&{YVYOfq{;jb?^v8F`TIj)1TM zdH~(SMK~cEi^Zv+$oAhob%5j0@Q;^wG3ukb2}h>tvF;*EI6vq(|& zDFqqRHgs@WNiyV5#I#INi^nvMi$y_<2R(6)gddev4nzfBP?c0ds%sp^6@;iDa4Ch; zqy)#QKvGp+l{6_Xr!-kjrRv=yPq$B=d9t>)_JwM_aJ=c|O4n9n + + + + + + + diff --git a/chrome/skin/default/zotero/mac/twisty.png b/chrome/skin/default/zotero/mac/twisty.png deleted file mode 100644 index c4af03f3107ad5be457e125263f5acb795005d81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1060 zcmah|O-K|`9G|cc(j;TGrQ}|PEM=t&gModx-MiO(m3359g>x(gH(cc?BJm;K~g~-I+T6bn{8Jkq6Xf)_ka9;|Nrm*@h-Qw z9jz$aTSie-MWQv9BKuad%1bws|J2FJYO+;fr3-hWKAceceN| zVIxJAFh;rycO{QY8Z!N=hw*1ko3JUWF_N`aZ4hF*7xo*L%zT)A#L$K=GbchxkhG(4 zz-S$DVCP6%S{oVE!a5T2NMfCDVxS&sK{f)wB-0O-QUkZ6wHC#7QXLM&p*%mBu= z#Il)8#-9oJk<-s|;c(dV!SgSP= zw3Ep-$Cg_t6e$^-Rc)5@1J*RXyz*!lr{KDbzoOmrunpN1bkUHbk$&{m7RjV`{|@8< zi5e+}v>_8(I1!T>a^u$xT~b6&5keu6i?;+hP5~kx1Y(d2ffhv(!_A<`O;|2gEe#gA z#yVH{Cs&F(P{qheBXqjhz4ifwkvo8FI@%ecld5J|p6!*kpcFdBS*XVyWYYQCNX8%W zJ?(K(h;y6}1Og8lM2@s97*#kB4DbOZ)*NnO3S9j!dH~Who}QO) lIyyR1Gw + + + + + + + From 298d4b6c0ee46d7893f6fb5633080146475efe38 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Mon, 28 Apr 2014 14:16:37 -0500 Subject: [PATCH 10/45] Disable RIS note attachments by default --- defaults/preferences/zotero.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index ee494d9c9a..4054fb6f8a 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -175,5 +175,5 @@ pref("extensions.zotero.fallbackLauncher.windows", ""); //Translators pref("extensions.zotero.translators.attachSupplementary", false); pref("extensions.zotero.translators.supplementaryAsLink", false); -pref("extensions.zotero.translators.RIS.import.ignoreUnknown", false); +pref("extensions.zotero.translators.RIS.import.ignoreUnknown", true); pref("extensions.zotero.translators.RIS.import.keepID", false); From f49c15d29ce57d623d113a24370d507d6a9fc411 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 28 Apr 2014 18:26:33 -0400 Subject: [PATCH 11/45] Use new Z icon in Add-ons window --- install.rdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.rdf b/install.rdf index 8037227f02..276316732e 100644 --- a/install.rdf +++ b/install.rdf @@ -16,7 +16,7 @@ http://www.zotero.org chrome://zotero/content/preferences/preferences.xul chrome://zotero/content/about.xul - chrome://zotero/skin/zotero_z_32px.png + chrome://zotero/skin/zotero-new-z-48px.png https://www.zotero.org/download/update-source.rdf 2 From b47c80912cbc486b42caecef358740b63bc74371 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 28 Apr 2014 18:30:18 -0400 Subject: [PATCH 12/45] Update translators and repotime --- resource/schema/repotime.txt | 2 +- translators | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/schema/repotime.txt b/resource/schema/repotime.txt index 99b5759f1d..36eb178f6a 100644 --- a/resource/schema/repotime.txt +++ b/resource/schema/repotime.txt @@ -1 +1 @@ -2014-04-24 05:50:01 +2014-04-28 03:30:01 diff --git a/translators b/translators index e1031d2e96..bd3b5b23ea 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit e1031d2e961d6613497171e85d8d8574d39c1cb0 +Subproject commit bd3b5b23ea4312e5ea561e604be86bae1a58c75d From a8f9b704e3832eb76b5c14894cf5c0ea0b6cefe1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 28 Apr 2014 19:26:53 -0400 Subject: [PATCH 13/45] Don't show "Status bar icon:" pref for Firefox 29+ --- chrome/content/zotero/preferences/preferences_general.js | 8 ++++++++ .../zotero/preferences/preferences_general_firefox.xul | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_general.js b/chrome/content/zotero/preferences/preferences_general.js index 7d97fa2e90..ec129753c1 100644 --- a/chrome/content/zotero/preferences/preferences_general.js +++ b/chrome/content/zotero/preferences/preferences_general.js @@ -34,6 +34,14 @@ Zotero_Preferences.General = { 'zotero.preferences.launchNonNativeFiles', Zotero.appName ); } + + // Only show icon options for Firefox <29 + if (Zotero.platformMajorVersion < 29) { + let statusBarRow = document.getElementById('zotero-prefpane-general-statusBarIcon-row'); + if (statusBarRow) { + statusBarRow.hidden = false; + } + } }, /** diff --git a/chrome/content/zotero/preferences/preferences_general_firefox.xul b/chrome/content/zotero/preferences/preferences_general_firefox.xul index 197f5bf019..d658e35f71 100644 --- a/chrome/content/zotero/preferences/preferences_general_firefox.xul +++ b/chrome/content/zotero/preferences/preferences_general_firefox.xul @@ -48,7 +48,7 @@ - +