From 30cbddeb9237d583a26cd04c3a2c96874abeecb8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 19 Apr 2019 14:45:14 +0200 Subject: [PATCH] Fix rating form field's JavaScript for more than 9 rating levels See #2509 --- .../WoltLabSuite/Core/Form/Builder/Field/Controller/Rating.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/Rating.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/Rating.js index 2edc46caf0..2d6a992a68 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/Rating.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/Rating.js @@ -85,7 +85,7 @@ define(['Dictionary', 'Environment'], function(Dictionary, Environment) { this._ratingElements.forEach(function(ratingElement, rating) { var icon = elByClass('icon', ratingElement)[0]; - this._toggleIcon(icon, rating <= currentRating); + this._toggleIcon(icon, ~~rating <= ~~currentRating); }.bind(this)); }, @@ -121,7 +121,7 @@ define(['Dictionary', 'Environment'], function(Dictionary, Environment) { this._ratingElements.forEach(function(ratingElement, rating) { var icon = elByClass('icon', ratingElement)[0]; - this._toggleIcon(icon, rating <= this._input.value); + this._toggleIcon(icon, ~~rating <= ~~this._input.value); }.bind(this)); }, -- 2.20.1