From 87e89400bdbdf72b78cb8e6070342fe843cdaaa9 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 27 Dec 2011 20:29:17 +0100 Subject: [PATCH] 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. --- wcfsetup/install/files/js/WCF.js | 4 ++++ 1 file changed, 4 insertions(+) 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'); } }); } -- 2.20.1