From: Joshua Rüsweg Date: Mon, 6 Jan 2020 17:07:46 +0000 (+0100) Subject: Fix incorrect usage of classList X-Git-Tag: 5.2.1~7^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a47c4a28ebc482fea2faeeaa4945d33d11a7aad;p=GitHub%2FWoltLab%2FWCF.git Fix incorrect usage of classList --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js index 816d4abda0..6789618bd0 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js @@ -74,7 +74,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl var progress = elBySel('progress', element); var icon = elCreate('span'); - icon.classList = 'icon icon64 fa-spinner'; + icon.className = 'icon icon64 fa-spinner'; var fileName = element.textContent; element.textContent = ""; @@ -94,7 +94,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl div.appendChild(innerDiv); var ul = elCreate('ul'); - ul.classList = 'buttonGroup'; + ul.className = 'buttonGroup'; div.appendChild(ul); // reset element textContent and replace with own element style @@ -113,7 +113,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl icon.classList.add('fa-ban'); var innerError = elCreate('span'); - innerError.classList = 'innerError'; + innerError.className = 'innerError'; innerError.textContent = Language.get('wcf.upload.error.uploadFailed'); DomUtil.insertAfter(innerError, elBySel('small', this._fileElements[uploadId][i])); } @@ -168,7 +168,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl if (elBySel('.innerError', this._fileElements[uploadId][i]) === null) { var innerError = elCreate('span'); - innerError.classList = 'innerError'; + innerError.className = 'innerError'; innerError.textContent = data['error'][i].errorMessage; DomUtil.insertAfter(innerError, elBySel('small', this._fileElements[uploadId][i])); } @@ -201,7 +201,7 @@ define(['Core', 'Language', 'Dom/Util', 'WoltLabSuite/Core/Ui/File/Delete', 'Upl if (innerError === null) { innerError = elCreate('small'); - innerError.classList = 'innerError'; + innerError.className = 'innerError'; DomUtil.insertAfter(innerError, this._buttonContainer); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js index 06510ee822..072a87230f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js @@ -176,7 +176,7 @@ define( var messageFooterGroup = element.closest('.messageFooterGroup'); var button = elCreate('button'); - button.classList = 'mobileReactButton'; + button.className = 'mobileReactButton'; button.innerHTML = element.innerHTML; button.addEventListener(WCF_CLICK_EVENT, this._toggleReactPopover.bind(this, objectID, button)); @@ -316,7 +316,7 @@ define( reactionTypeItem.title = reactionType.title; var reactionTypeItemSpan = elCreate('span'); - reactionTypeItemSpan.classList = 'reactionTypeButtonTitle'; + reactionTypeItemSpan.className = 'reactionTypeButtonTitle'; reactionTypeItemSpan.innerHTML = reactionType.title; //noinspection JSUnresolvedVariable