From: Matthias Schmidt Date: Tue, 27 Dec 2011 19:29:17 +0000 (+0100) Subject: Adds disabled class toggle for JS toggle action X-Git-Tag: 2.0.0_Beta_1~1425^2^2~1^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=87e89400bdbdf72b78cb8e6070342fe843cdaaa9;p=GitHub%2FWoltLab%2FWCF.git Adds disabled class toggle for JS toggle action If a database object is disabled, its row gets the CSS class `disabled`. If it is enabled, the `disabled` class is removed. --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 127fd1d58e..b8c77539dc 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -1350,6 +1350,7 @@ WCF.Action.Toggle.prototype = { return this.src.replace(/enabled1\.svg$/, 'disabled1.svg'); } }); + // toogle icon title $toggleButton.attr('title', function() { if (this.src.match(/enabled1\.svg$/)) { @@ -1359,6 +1360,9 @@ WCF.Action.Toggle.prototype = { return $(this).data('enableMessage'); } }); + + // toggle css class + $(container).toggleClass('disabled'); } }); }