diff --git a/chrome/content/zotero/components/icons.jsx b/chrome/content/zotero/components/icons.jsx index 8da58f78bf..74ed61292a 100644 --- a/chrome/content/zotero/components/icons.jsx +++ b/chrome/content/zotero/components/icons.jsx @@ -190,7 +190,7 @@ let domElementCache = {}; * @param {String} icon * @returns {Element} */ -module.exports.getDomElement = function (icon) { +module.exports.getDOMElement = function (icon) { if (domElementCache[icon]) return domElementCache[icon].cloneNode(true); if (!module.exports[icon]) { Zotero.debug(`Attempting to get non-existant icon ${icon}`); diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index 4a58ae785d..c361c15327 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -31,7 +31,7 @@ const cx = require('classnames'); const JSWindow = require('./js-window'); const Draggable = require('./draggable'); const { injectIntl } = require('react-intl'); -const { IconDownChevron, getDomElement } = require('components/icons'); +const { IconDownChevron, getDOMElement } = require('components/icons'); const RESIZER_WIDTH = 5; // px @@ -1343,7 +1343,7 @@ function renderCheckboxCell(index, data, column) { span.setAttribute('role', 'checkbox'); span.setAttribute('aria-checked', data); if (data) { - span.appendChild(getDomElement('IconTick')); + span.appendChild(getDOMElement('IconTick')); } return span; } diff --git a/chrome/content/zotero/containers/collectionTree.jsx b/chrome/content/zotero/containers/collectionTree.jsx index 18e099d654..32e08333f7 100644 --- a/chrome/content/zotero/containers/collectionTree.jsx +++ b/chrome/content/zotero/containers/collectionTree.jsx @@ -30,7 +30,7 @@ const LibraryTree = require('containers/libraryTree'); const VirtualizedTable = require('components/virtualized-table'); const { TreeSelectionStub } = VirtualizedTable; const Icons = require('components/icons'); -const { getDomElement: getDOMIcon } = Icons; +const { getDOMElement: getDOMIcon } = Icons; const { getDragTargetOrient } = require('components/utils'); const { Cc, Ci, Cu } = require('chrome'); diff --git a/chrome/content/zotero/containers/itemTree.jsx b/chrome/content/zotero/containers/itemTree.jsx index 0000f5f3e0..e601d7b571 100644 --- a/chrome/content/zotero/containers/itemTree.jsx +++ b/chrome/content/zotero/containers/itemTree.jsx @@ -32,7 +32,7 @@ const LibraryTree = require('containers/libraryTree'); const VirtualizedTable = require('components/virtualized-table'); const { renderCell, TreeSelectionStub } = VirtualizedTable; const Icons = require('components/icons'); -const { getDomElement } = Icons; +const { getDOMElement } = Icons; const { COLUMNS } = require('containers/itemTreeColumns'); const { Cc, Ci, Cu } = require('chrome'); Cu.import("resource://gre/modules/osfile.jsm"); @@ -54,7 +54,7 @@ function makeItemRenderer(itemTree) { twisty.classList.add("spacer-twisty"); } else { - twisty = getDomElement("IconTwisty"); + twisty = getDOMElement("IconTwisty"); twisty.classList.add('twisty'); if (itemTree.isContainerOpen(index)) { twisty.classList.add('open'); @@ -71,7 +71,7 @@ function makeItemRenderer(itemTree) { const item = itemTree.getRow(index).ref; let retracted = ""; if (Zotero.Retractions.isRetracted(item)) { - retracted = getDomElement('IconCross'); + retracted = getDOMElement('IconCross'); retracted.classList.add("retracted"); } @@ -108,11 +108,11 @@ function makeItemRenderer(itemTree) { const state = item.getBestAttachmentStateCached(); let icon = ""; if (state === 1) { - icon = getDomElement('IconBulletBlue'); + icon = getDOMElement('IconBulletBlue'); icon.classList.add('cell-icon'); } else if (state === -1) { - icon = getDomElement('IconBulletBlueEmpty'); + icon = getDOMElement('IconBulletBlueEmpty'); icon.classList.add('cell-icon'); } span.append(icon); @@ -128,7 +128,7 @@ function makeItemRenderer(itemTree) { const exists = item.fileExistsCached(); let icon = ""; if (exists !== null) { - icon = exists ? getDomElement('IconBulletBlue') : getDomElement('IconBulletBlueEmpty'); + icon = exists ? getDOMElement('IconBulletBlue') : getDOMElement('IconBulletBlueEmpty'); icon.classList.add('cell-icon'); } span.append(icon); @@ -3399,7 +3399,7 @@ var ItemTree = class ItemTree extends LibraryTree { if (!Icons[iconClsName]) { iconClsName = "IconTreeitem"; } - var icon = getDomElement(iconClsName); + var icon = getDOMElement(iconClsName); if (!icon) { Zotero.debug('Could not find tree icon for "' + itemType + '"'); return document.createElementNS("http://www.w3.org/1999/xhtml", 'span'); diff --git a/chrome/content/zotero/preferences/preferences_sync.jsx b/chrome/content/zotero/preferences/preferences_sync.jsx index fd71f90886..2f81afa444 100644 --- a/chrome/content/zotero/preferences/preferences_sync.jsx +++ b/chrome/content/zotero/preferences/preferences_sync.jsx @@ -31,7 +31,7 @@ Components.utils.import("resource://zotero/config.js"); var React = require('react'); var ReactDOM = require('react-dom'); var VirtualizedTable = require('components/virtualized-table'); -var { getDomElement } = require('components/icons'); +var { getDOMElement } = require('components/icons'); var { IntlProvider } = require('react-intl'); var { renderCell } = VirtualizedTable; diff --git a/chrome/content/zotero/progressQueueDialog.jsx b/chrome/content/zotero/progressQueueDialog.jsx index 1eece43d3e..006a77a98c 100644 --- a/chrome/content/zotero/progressQueueDialog.jsx +++ b/chrome/content/zotero/progressQueueDialog.jsx @@ -28,7 +28,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import VirtualizedTable from 'components/virtualized-table'; const { IntlProvider } = require('react-intl'); -const { getDomElement } = require('components/icons'); +const { getDOMElement } = require('components/icons'); const { renderCell } = VirtualizedTable; let _progressIndicator = null; @@ -37,13 +37,13 @@ let _tree; function _getImageByStatus(status) { if (status === Zotero.ProgressQueue.ROW_PROCESSING) { - return getDomElement('IconArrowRefresh'); + return getDOMElement('IconArrowRefresh'); } else if (status === Zotero.ProgressQueue.ROW_FAILED) { - return getDomElement('IconCross'); + return getDOMElement('IconCross'); } else if (status === Zotero.ProgressQueue.ROW_SUCCEEDED) { - return getDomElement('IconTick'); + return getDOMElement('IconTick'); } return document.createElementNS("http://www.w3.org/1999/xhtml", 'span'); } diff --git a/chrome/content/zotero/rtfScan.jsx b/chrome/content/zotero/rtfScan.jsx index bc0a28753c..d58edfe615 100644 --- a/chrome/content/zotero/rtfScan.jsx +++ b/chrome/content/zotero/rtfScan.jsx @@ -32,7 +32,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import VirtualizedTable from 'components/virtualized-table'; import { IntlProvider } from 'react-intl'; -import { getDomElement } from 'components/icons'; +import { getDOMElement } from 'components/icons'; /** * Front end for recognizing PDFs @@ -712,7 +712,7 @@ var Zotero_RTFScan = new function() { if (column.primary) { let twisty; if (row.children || (this._rows[index + 1] && this._rows[index + 1].parent == row)) { - twisty = getDomElement("IconTwisty"); + twisty = getDOMElement("IconTwisty"); twisty.classList.add('twisty'); if (!row.collapsed) { twisty.classList.add('open'); @@ -743,10 +743,10 @@ var Zotero_RTFScan = new function() { span.className = `cell action ${column.className}`; if (row.parent) { if (row.action) { - span.appendChild(getDomElement('IconRTFScanAccept')); + span.appendChild(getDOMElement('IconRTFScanAccept')); } else { - span.appendChild(getDomElement('IconRTFScanLink')); + span.appendChild(getDOMElement('IconRTFScanLink')); } span.addEventListener('mouseup', e => this._onActionMouseUp(e, index), { passive: true }); span.style.pointerEvents = 'auto';