From: Joshua Rüsweg Date: Mon, 6 Aug 2018 13:01:11 +0000 (+0200) Subject: Improve readability of assigned classes X-Git-Tag: 5.2.0_Alpha_1~364^2~101^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a7dc377d980ce8107e035c9d540ab3530504bc6;p=GitHub%2FWoltLab%2FWCF.git Improve readability of assigned classes See #2508 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js index d4139bdf1e..39d10d8bf8 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js @@ -125,7 +125,13 @@ define( if (badgeContainer !== null) { summaryList = elCreate('ul'); - summaryList.className = 'reactionSummaryList' + (isSummaryPosition ? ' likesSummary' : ' reactionSummaryListTiny') + ((isSummaryPosition && this._options.badgeClassNames) ? ' ' + this._options.badgeClassNames : ''); + summaryList.classList.add('reactionSummaryList'); + if (isSummaryPosition) { + summaryList.classList.add('likesSummary'); + } + else { + summaryList.classList.add('reactionSummaryListTiny'); + } for (var key in elementData.users) { if (key === "reactionTypeID") continue;