diff options
author | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:34:32 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-05-24 18:34:32 +0200 |
commit | b30184d885329317b9dbd70835d2c4d154f98475 (patch) | |
tree | 445acc2481e8456211c3e893e7789fe4b5978791 /ui/jquery.ui.button.js | |
parent | ec6d88fae464ffb432df6c8d2ed06ee9fa5b4dae (diff) | |
parent | a1f604eb453208c80ec17c42c7bb4e3a1c624102 (diff) | |
download | jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.tar.gz jquery-ui-b30184d885329317b9dbd70835d2c4d154f98475.zip |
Merge with master
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index f84d748cf..810191775 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -73,7 +73,7 @@ $.widget( "ui.button", { focusClass = "ui-state-focus"; if ( options.label === null ) { - options.label = this.buttonElement.html(); + options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); } this.buttonElement @@ -214,9 +214,9 @@ $.widget( "ui.button", { _determineButtonType: function() { var ancestor, labelSelector, checked; - if ( this.element.is(":checkbox") ) { + if ( this.element.is("[type=checkbox]") ) { this.type = "checkbox"; - } else if ( this.element.is(":radio") ) { + } else if ( this.element.is("[type=radio]") ) { this.type = "radio"; } else if ( this.element.is("input") ) { this.type = "input"; @@ -354,11 +354,10 @@ $.widget( "ui.button", { } }); -$.ui.button.version = "@VERSION"; - $.widget( "ui.buttonset", { + version: "@VERSION", options: { - items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" + items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)" }, _create: function() { |