From: Tim Düsterhus Date: Wed, 2 Jul 2014 16:24:17 +0000 (+0200) Subject: Fix disabling of radio buttons X-Git-Tag: 2.1.0_Alpha_1~590^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f39f8cb766b98632f4dad2e2a21000f4811db1d8;p=GitHub%2FWoltLab%2FWCF.git Fix disabling of radio buttons --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 61fcfccd76..5652fa7c65 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -135,10 +135,14 @@ WCF.Message.EditHistory = Class.extend({ _initInputs: function() { var self = this; this._newIDInputs.change(function(event) { - var newID = $(this).val(); + var newID = parseInt($(this).val()) + if ($(this).val() === 'current') newID = Infinity; self._oldIDInputs.each(function(event) { - if ($(this).val() >= newID) { + var oldID = parseInt($(this).val()) + if ($(this).val() === 'current') oldID = Infinity; + + if (oldID >= newID) { $(this).disable(); } else { @@ -148,10 +152,14 @@ WCF.Message.EditHistory = Class.extend({ }); this._oldIDInputs.change(function(event) { - var oldID = $(this).val(); + var oldID = parseInt($(this).val()); + if ($(this).val() === 'current') oldID = Infinity; self._newIDInputs.each(function(event) { - if ($(this).val() <= oldID) { + var newID = parseInt($(this).val()) + if ($(this).val() === 'current') newID = Infinity; + + if (newID <= oldID) { $(this).disable(); } else {