Silence some warnings in QuickFormat
This commit is contained in:
parent
570e628679
commit
b62b479ae4
|
@ -80,7 +80,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
var locators = Zotero.Cite.labels;
|
var locators = Zotero.Cite.labels;
|
||||||
var menu = document.getElementById("locator-label");
|
var menu = document.getElementById("locator-label");
|
||||||
var labelList = document.getElementById("locator-label-popup");
|
var labelList = document.getElementById("locator-label-popup");
|
||||||
for each(var locator in locators) {
|
for(var locator of locators) {
|
||||||
var locatorLabel = Zotero.getString('citation.locator.'+locator.replace(/\s/g,''));
|
var locatorLabel = Zotero.getString('citation.locator.'+locator.replace(/\s/g,''));
|
||||||
|
|
||||||
// add to list of labels
|
// add to list of labels
|
||||||
|
@ -267,7 +267,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
if(year) str += " "+year;
|
if(year) str += " "+year;
|
||||||
|
|
||||||
var s = new Zotero.Search();
|
var s = new Zotero.Search();
|
||||||
str = str.replace(" & ", " ", "g").replace(" and ", " ", "g");
|
str = str.replace(/ (?:&|and) /g, " ", "g");
|
||||||
if(charRe.test(str)) {
|
if(charRe.test(str)) {
|
||||||
Zotero.debug("QuickFormat: QuickSearch: "+str);
|
Zotero.debug("QuickFormat: QuickSearch: "+str);
|
||||||
s.addCondition("quicksearch-titleCreatorYear", "contains", str);
|
s.addCondition("quicksearch-titleCreatorYear", "contains", str);
|
||||||
|
@ -304,7 +304,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
for(var i=0, iCount=citedItems.length; i<iCount; i++) {
|
for(var i=0, iCount=citedItems.length; i<iCount; i++) {
|
||||||
// Generate a string to search for each item
|
// Generate a string to search for each item
|
||||||
var item = citedItems[i],
|
var item = citedItems[i],
|
||||||
itemStr = [creator.ref.firstName+" "+creator.ref.lastName for each(creator in item.getCreators())];
|
itemStr = [creator.ref.firstName+" "+creator.ref.lastName for (creator of item.getCreators())];
|
||||||
itemStr = itemStr.concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)]).join(" ");
|
itemStr = itemStr.concat([item.getField("title"), item.getField("date", true, true).substr(0, 4)]).join(" ");
|
||||||
|
|
||||||
// See if words match
|
// See if words match
|
||||||
|
@ -397,7 +397,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
// Also take into account items cited in this citation. This means that the sorting isn't
|
// Also take into account items cited in this citation. This means that the sorting isn't
|
||||||
// exactly by # of items cited from each library, but maybe it's better this way.
|
// exactly by # of items cited from each library, but maybe it's better this way.
|
||||||
_updateCitationObject();
|
_updateCitationObject();
|
||||||
for each(var citationItem in io.citation.citationItems) {
|
for(var citationItem of io.citation.citationItems) {
|
||||||
var citedItem = Zotero.Cite.getItem(citationItem.id);
|
var citedItem = Zotero.Cite.getItem(citationItem.id);
|
||||||
if(!citedItem.cslItemID) {
|
if(!citedItem.cslItemID) {
|
||||||
var libraryID = citedItem.libraryID ? citedItem.libraryID : 0;
|
var libraryID = citedItem.libraryID ? citedItem.libraryID : 0;
|
||||||
|
@ -786,7 +786,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
if(!panelFrameHeight) {
|
if(!panelFrameHeight) {
|
||||||
panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight;
|
panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight;
|
||||||
var computedStyle = window.getComputedStyle(referenceBox, null);
|
var computedStyle = window.getComputedStyle(referenceBox, null);
|
||||||
for each(var attr in ["border-top-width", "border-bottom-width"]) {
|
for(var attr of ["border-top-width", "border-bottom-width"]) {
|
||||||
var val = computedStyle.getPropertyValue(attr);
|
var val = computedStyle.getPropertyValue(attr);
|
||||||
if(val) {
|
if(val) {
|
||||||
var m = pixelRe.exec(val);
|
var m = pixelRe.exec(val);
|
||||||
|
@ -941,7 +941,7 @@ var Zotero_QuickFormat = new function () {
|
||||||
if(item.id) {
|
if(item.id) {
|
||||||
var libraryName = item.libraryID ? Zotero.Libraries.getName(item.libraryID)
|
var libraryName = item.libraryID ? Zotero.Libraries.getName(item.libraryID)
|
||||||
: Zotero.getString('pane.collections.library');
|
: Zotero.getString('pane.collections.library');
|
||||||
panelLibraryLink.textContent = Zotero.getString("integration.openInLibrary", libraryName);
|
panelLibraryLink.label = Zotero.getString("integration.openInLibrary", libraryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
target.setAttribute("selected", "true");
|
target.setAttribute("selected", "true");
|
||||||
|
|
|
@ -51,7 +51,7 @@ WindowDraggingElement.prototype = {
|
||||||
if (aEvent.button != 0 ||
|
if (aEvent.button != 0 ||
|
||||||
this._window.fullScreen ||
|
this._window.fullScreen ||
|
||||||
!this.mouseDownCheck.call(this._elem, aEvent) ||
|
!this.mouseDownCheck.call(this._elem, aEvent) ||
|
||||||
aEvent.getPreventDefault())
|
aEvent.defaultPrevented)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let target = aEvent.originalTarget, parent = aEvent.originalTarget;
|
let target = aEvent.originalTarget, parent = aEvent.originalTarget;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user