From: Harald Szekely Date: Mon, 16 Jan 2012 16:58:38 +0000 (-0800) Subject: Merge pull request #330 from Gravatronics/enhancement/toggleDefaultMessages X-Git-Tag: 2.0.0_Beta_1~1425^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6357fc79f5331e9b0e6a3c59e2014aeed4e47525;p=GitHub%2FWoltLab%2FWCF.git Merge pull request #330 from Gravatronics/enhancement/toggleDefaultMessages Adds default titles for toggle buttons in javascript handler --- 6357fc79f5331e9b0e6a3c59e2014aeed4e47525 diff --cc wcfsetup/install/files/js/WCF.js index c68ab00102,0913c58fc4..74ee956e32 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@@ -1382,17 -1353,22 +1382,25 @@@ WCF.Action.Toggle.prototype = // toogle icon title $toggleButton.attr('title', function() { if (this.src.match(/enabled1\.svg$/)) { - return $(this).data('disableMessage'); + if ($(this).data('disableTitle')) { + return $(this).data('disableTitle') + } + + return WCF.Language.get('wcf.global.button.disable'); } else { - return $(this).data('enableMessage'); + if ($(this).data('enableTitle')) { + return $(this).data('enableTitle') + } + + return WCF.Language.get('wcf.global.button.enable'); } }); + + // toggle css class + $(container).toggleClass('disabled'); } - }); + }, this)); } };