Merge branch '4.0'

This commit is contained in:
Dan Stillman 2016-03-17 05:08:06 -04:00
commit f4896a15ec
12 changed files with 792 additions and 1038 deletions

View File

@ -15,7 +15,7 @@
<content> <content>
<vbox anonid="tiles" flex="1" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox anonid="tiles" flex="1" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<hbox> <hbox>
<spacer class="colorpickertile" style="background-color: #000000" color="#000000"/> <image class="colorpickertile" color="#000000"/>
</hbox> </hbox>
</vbox> </vbox>
</content> </content>
@ -90,17 +90,21 @@
let light = color.charAt(0) == 'L'; let light = color.charAt(0) == 'L';
color = light ? color.substr(1) : color; color = light ? color.substr(1) : color;
var spacer = document.createElement('spacer'); let image = document.createElement('image');
spacer.className = 'colorpickertile' + (light ? ' cp-light' : ''); image.className = 'colorpickertile' + (light ? ' cp-light' : '');
spacer.setAttribute('style', 'background-color: ' + color); image.setAttribute('color', color);
spacer.setAttribute('color', color);
let dataURI = "data:image/svg+xml,<svg style='background-color: "
+ encodeURIComponent(color) + "' xmlns='http://www.w3.org/2000/svg' />";
image.setAttribute('src', dataURI);
if (tileWidth) { if (tileWidth) {
spacer.width = tileWidth; image.width = tileWidth;
} }
if (tileHeight) { if (tileHeight) {
spacer.height = tileHeight; image.height = tileHeight;
} }
hbox.appendChild(spacer); hbox.appendChild(image);
} }
tiles.appendChild(hbox); tiles.appendChild(hbox);
} }
@ -117,7 +121,7 @@
<stylesheet src="chrome://zotero/skin/bindings/customcolorpicker.css"/> <stylesheet src="chrome://zotero/skin/bindings/customcolorpicker.css"/>
</resources> </resources>
<content> <content>
<xul:hbox class="colorpicker-button-colorbox" anonid="colorbox" flex="1" xbl:inherits="disabled"/> <xul:image class="colorpicker-button-colorbox" anonid="colorbox" flex="1" xbl:inherits="disabled"/>
<xul:panel class="colorpicker-button-menupopup" <xul:panel class="colorpicker-button-menupopup"
anonid="colorpopup" noautofocus="true" level="top" anonid="colorpopup" noautofocus="true" level="top"

View File

@ -1395,6 +1395,12 @@
this._dynamicFields.focus(); this._dynamicFields.focus();
} }
// In Firefox 45, when clicking a multiline field such as Extra, the event is
// triggered on the inner 'description' element instead of the 'vbox'.
if (elem.tagName == 'description') {
elem = elem.parentNode;
}
Zotero.debug('Showing editor'); Zotero.debug('Showing editor');
var fieldName = elem.getAttribute('fieldname'); var fieldName = elem.getAttribute('fieldname');

View File

@ -305,9 +305,7 @@ var Zotero_QuickFormat = new function () {
// Generate a string to search for each item // Generate a string to search for each item
let item = citedItems[i]; let item = citedItems[i];
let itemStr = item.getCreators() let itemStr = item.getCreators()
.map(creator => { .map(creator => creator.ref.firstName + " " + creator.ref.lastName)
creator.ref.firstName + " " + creator.ref.lastName
})
.concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)]) .concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)])
.join(" "); .join(" ");

@ -1 +1 @@
Subproject commit 1e9140c53f38e07f59718d11a6d4f2d09d7c5c8e Subproject commit 07284a9617dfd2d28a46987cbcadbae0b2d84db7

File diff suppressed because it is too large Load Diff

View File

@ -2206,7 +2206,8 @@ Zotero.ItemTreeView.prototype.onColumnPickerShowing = function (event) {
moreMenuPopup.setAttribute('anonid', id + '-popup'); moreMenuPopup.setAttribute('anonid', id + '-popup');
let treecols = menupopup.parentNode.parentNode; let treecols = menupopup.parentNode.parentNode;
let subs = treecols.getElementsByAttribute('submenu', 'true').map(x => x.getAttribute('label')); let subs = Array.from(treecols.getElementsByAttribute('submenu', 'true'))
.map(x => x.getAttribute('label'));
var moreItems = []; var moreItems = [];

View File

@ -385,7 +385,7 @@ Zotero.QuickCopy = new function() {
var csl = Zotero.Styles.get(format.id).getCiteProc(locale); var csl = Zotero.Styles.get(format.id).getCiteProc(locale);
csl.updateItems(items.map(item => item.id)); csl.updateItems(items.map(item => item.id));
var citation = { var citation = {
citationItems: items.map(item => item.id), citationItems: items.map(item => ({ id: item.id })),
properties: {} properties: {}
}; };
var html = csl.previewCitationCluster(citation, [], [], "html"); var html = csl.previewCitationCluster(citation, [], [], "html");

View File

@ -24,7 +24,7 @@
<em:targetApplication> <em:targetApplication>
<Description> <Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>31.0</em:minVersion> <em:minVersion>38.0</em:minVersion>
<em:maxVersion>45.*</em:maxVersion> <em:maxVersion>45.*</em:maxVersion>
</Description> </Description>
</em:targetApplication> </em:targetApplication>

View File

@ -1 +1 @@
2016-02-27 22:00:00 2016-03-14 15:56:00

2
styles

@ -1 +1 @@
Subproject commit b864314ae1f12fc432c1d4f72b5e5fd0ce7beae7 Subproject commit 2a33b37ec422fa00f2a860d906120357f23574a0

@ -1 +1 @@
Subproject commit 442a7a17c4ecfb549ae48034dec768991b8be1e8 Subproject commit 0ef37cc957c3faf5ac6b4dd6c8f1b89e00b8402b

View File

@ -11,7 +11,7 @@
<targetApplication> <targetApplication>
<RDF:Description> <RDF:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id> <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
<minVersion>31.0</minVersion> <minVersion>38.0</minVersion>
<maxVersion>45.*</maxVersion> <maxVersion>45.*</maxVersion>
<updateLink>http://download.zotero.org/extension/zotero.xpi</updateLink> <updateLink>http://download.zotero.org/extension/zotero.xpi</updateLink>
<updateHash>sha1:</updateHash> <updateHash>sha1:</updateHash>