Buttonset - remove corner classes from button widgets instead of button elements on destroy. Fixes #5361 - buttonset method destroy doesn't remove corner classes from label elements

This commit is contained in:
Richard Worth 2010-03-17 13:03:23 +00:00
parent 08a750a58f
commit 124f84635f

View File

@ -338,8 +338,12 @@ $.widget( "ui.buttonset", {
destroy: function() { destroy: function() {
this.element.removeClass( "ui-button-set" ); this.element.removeClass( "ui-button-set" );
this.buttons this.buttons
.map(function() {
return $( this ).button( "widget" )[ 0 ];
})
.removeClass( "ui-corner-left ui-corner-right" )
.end()
.button( "destroy" ) .button( "destroy" )
.removeClass( "ui-corner-left ui-corner-right" );
$.Widget.prototype.destroy.call( this ); $.Widget.prototype.destroy.call( this );
} }