Fixing the toggling of the icon
authorTim Düsterhus <timwolla@arcor.de>
Sun, 28 Aug 2011 11:26:13 +0000 (13:26 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Sun, 28 Aug 2011 11:29:44 +0000 (13:29 +0200)
wcfsetup/install/files/js/WCF.js

index 056da0ca4c5224bcd0850c716487411e0f19157e..53af932bd13c9d406cb0009eb32bbb1d47c34f37 100644 (file)
@@ -812,16 +812,16 @@ WCF.Action.Toggle.prototype = {
                                
                                // toggle icon source
                                $toggleButton.attr('src', function() {
-                                       if (this.src.match(/enabled(S|M|L)\.png$/)) {
-                                               return this.src.replace(/enabled(S|M|L)\.png$/, 'disabled$1\.png');
+                                       if (this.src.match(/disabled1\.svg$/)) {
+                                               return this.src.replace(/disabled1\.svg$/, 'enabled1.svg');
                                        }
                                        else {
-                                               return this.src.replace(/disabled(S|M|L)\.png$/, 'enabled$1\.png');
+                                               return this.src.replace(/enabled1\.svg$/, 'disabled1.svg');
                                        }
                                });
                                // toogle icon title
                                $toggleButton.attr('title', function() {
-                                       if (this.src.match(/enabled(S|M|L)\.png$/)) {
+                                       if (this.src.match(/enabled1\.svg$/)) {
                                                return $(this).data('disableMessage');
                                        }
                                        else {