Bind the style changer to all matching buttons
authorAlexander Ebert <ebert@woltlab.com>
Tue, 31 Mar 2020 15:29:01 +0000 (17:29 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 31 Mar 2020 15:29:01 +0000 (17:29 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Style/Changer.js

index 14b0290dcb4a1da9784df543e1d82dca8a56d128..41cee996b740b1ab3187ac48d71eee275a23d2a9 100644 (file)
@@ -17,10 +17,9 @@ define(['Ajax', 'Language', 'Ui/Dialog'], function(Ajax, Language, UiDialog) {
                 * Adds the style changer to the bottom navigation.
                 */
                setup: function() {
-                       var link = elBySel('.jsButtonStyleChanger');
-                       if (link) {
+                       elBySelAll('.jsButtonStyleChanger', undefined, (function (link) {
                                link.addEventListener(WCF_CLICK_EVENT, this.showDialog.bind(this));
-                       }
+                       }).bind(this));
                },
                
                /**