From: Matthias Schmidt Date: Fri, 19 Apr 2019 12:45:14 +0000 (+0200) Subject: Fix rating form field's JavaScript for more than 9 rating levels X-Git-Tag: 5.2.0_Alpha_1~128 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30cbddeb9237d583a26cd04c3a2c96874abeecb8;p=GitHub%2FWoltLab%2FWCF.git Fix rating form field's JavaScript for more than 9 rating levels See #2509 --- 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)); },