Merge pull request #330 from Gravatronics/enhancement/toggleDefaultMessages
authorHarald Szekely <szekely@woltlab.com>
Mon, 16 Jan 2012 16:58:38 +0000 (08:58 -0800)
committerHarald Szekely <szekely@woltlab.com>
Mon, 16 Jan 2012 16:58:38 +0000 (08:58 -0800)
Adds default titles for toggle buttons in javascript handler

1  2 
com.woltlab.wcf/template/headInclude.tpl
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/js/WCF.js

index c68ab00102048c2d9333298b5ffd569ed2442fcf,0913c58fc4683f8b37aabf35deb900f812fca43a..74ee956e327140c3068dd5e72fe8a4353319bccc
@@@ -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));
        }
  };