From f39f8cb766b98632f4dad2e2a21000f4811db1d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 2 Jul 2014 18:24:17 +0200 Subject: [PATCH] Fix disabling of radio buttons --- wcfsetup/install/files/js/WCF.Message.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 { -- 2.20.1