Merge "Revert "jquery.byteLimit: Partial rewrite to fix logic errors""
[lhc/web/wiklou.git] / resources / jquery.ui / jquery.ui.button.js
index 94dce1c..47bd6aa 100644 (file)
@@ -1,7 +1,7 @@
-/*
- * jQuery UI Button 1.8.17
+/*!
+ * jQuery UI Button 1.8.21
  *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
  * Dual licensed under the MIT or GPL Version 2 licenses.
  * http://jquery.org/license
  *
@@ -56,7 +56,9 @@ $.widget( "ui.button", {
                        .bind( "reset.button", formResetHandler );
 
                if ( typeof this.options.disabled !== "boolean" ) {
-                       this.options.disabled = this.element.propAttr( "disabled" );
+                       this.options.disabled = !!this.element.propAttr( "disabled" );
+               } else {
+                       this.element.propAttr( "disabled", this.options.disabled );
                }
 
                this._determineButtonType();
@@ -72,10 +74,6 @@ $.widget( "ui.button", {
                        options.label = this.buttonElement.html();
                }
 
-               if ( this.element.is( ":disabled" ) ) {
-                       options.disabled = true;
-               }
-
                this.buttonElement
                        .addClass( baseClasses )
                        .attr( "role", "button" )