]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: Add disabled class on init if the disabled option is set to true.
authorScott González <scott.gonzalez@gmail.com>
Tue, 2 Mar 2010 05:29:35 +0000 (05:29 +0000)
committerScott González <scott.gonzalez@gmail.com>
Tue, 2 Mar 2010 05:29:35 +0000 (05:29 +0000)
Fixes #5250 - Button: initializing with disabled = true isn't visually disabled.

ui/jquery.ui.button.js

index 62f7a02f5efb9956735d7db1f522d1a16324d563..9adf0c1934f9492786b3340e1d6f954c5535e0e8 100644 (file)
@@ -141,6 +141,10 @@ $.widget( "ui.button", {
                        }
                }
 
+               // TODO: pull out $.Widget's handling for the disabled option into
+               // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
+               // be overridden by individual plugins
+               $.Widget.prototype._setOption.call( this, "disabled", options.disabled );
                this._resetButton();
        },