Improve readability of assigned classes
authorJoshua Rüsweg <josh@bastelstu.be>
Mon, 6 Aug 2018 13:01:11 +0000 (15:01 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Mon, 6 Aug 2018 13:01:11 +0000 (15:01 +0200)
See #2508

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js

index d4139bdf1e711b8d4b682976809c1fed1aa07cab..39d10d8bf893e9f6adb8262743e610a2868c728a 100644 (file)
@@ -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;