diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-11-12 10:28:55 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-11-12 10:28:55 -0500 |
commit | 5dad57e3c2001b6c644e3c39798198bc34fa1e5d (patch) | |
tree | 3d467ae02425add93383fa85dfe6a54681ce0db5 /ui | |
parent | fce1f97f7677f29cc8ba7b146e67799027cf1995 (diff) | |
download | jquery-ui-5dad57e3c2001b6c644e3c39798198bc34fa1e5d.tar.gz jquery-ui-5dad57e3c2001b6c644e3c39798198bc34fa1e5d.zip |
Buttonset: Added items option and removed visible filter for adding rounded corners. Fixes #6262 - buttonset not applying ui-corner to invisible elements.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.button.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 912e45273..78134e308 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -315,6 +315,10 @@ $.widget( "ui.button", { }); $.widget( "ui.buttonset", { + options: { + items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" + }, + _create: function() { this.element.addClass( "ui-buttonset" ); }, @@ -332,7 +336,7 @@ $.widget( "ui.buttonset", { }, refresh: function() { - this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" ) + this.buttons = this.element.find( this.options.items ) .filter( ":ui-button" ) .button( "refresh" ) .end() @@ -343,13 +347,11 @@ $.widget( "ui.buttonset", { return $( this ).button( "widget" )[ 0 ]; }) .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) - .filter( ":visible" ) - .filter( ":first" ) - .addClass( "ui-corner-left" ) - .end() - .filter( ":last" ) - .addClass( "ui-corner-right" ) - .end() + .filter( ":first" ) + .addClass( "ui-corner-left" ) + .end() + .filter( ":last" ) + .addClass( "ui-corner-right" ) .end() .end(); }, |