aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-08-18 14:51:30 -0400
committerScott González <scott.gonzalez@gmail.com>2010-08-18 14:51:30 -0400
commit2838c11ea8fa1bd8dfffe27a6e28dee6d3e0d423 (patch)
tree93c101413e2e3d5c0c62157b278d97b30ca84d7f /ui
parent9060bf3d09a547563e94815f9e0a1c4908ebd904 (diff)
downloadjquery-ui-2838c11ea8fa1bd8dfffe27a6e28dee6d3e0d423.tar.gz
jquery-ui-2838c11ea8fa1bd8dfffe27a6e28dee6d3e0d423.zip
Button: Read disabled attribute from original element if disabled option is null. Fixes #5252 -Button: read disabled option from input elements.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.button.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 7d21fa495..5e52fb4cb 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -44,6 +44,7 @@ var lastActive,
$.widget( "ui.button", {
options: {
+ disabled: null,
text: true,
label: null,
icons: {
@@ -56,6 +57,10 @@ $.widget( "ui.button", {
.unbind( "reset.button" )
.bind( "reset.button", formResetHandler );
+ if ( typeof this.options.disabled !== "boolean" ) {
+ this.options.disabled = this.element.attr( "disabled" );
+ }
+
this._determineButtonType();
this.hasTitle = !!this.buttonElement.attr( "title" );