Skip to content
Permalink
Browse files

Dialog: Follow-up to c77ca67 - exclude button options from properties…

… to create the button.
  • Loading branch information...
jzaefferer committed Nov 22, 2012
1 parent a09f5c0 commit ec1f1bde76c555e7643899c5bbbb200353f780ea
Showing with 8 additions and 5 deletions.
  1. +8 −5 ui/jquery.ui.dialog.js
@@ -376,7 +376,7 @@ $.widget("ui.dialog", {

if ( !$.isEmptyObject( buttons ) ) {
$.each( buttons, function( name, props ) {
var click;
var click, buttonOptions;
props = $.isFunction( props ) ?
{ click: props, text: name } :
props;
@@ -387,11 +387,14 @@ $.widget("ui.dialog", {
props.click = function() {
click.apply( that.element[0], arguments );
};
buttonOptions = {
icons: props.icons,
text: props.showText
};
delete props.icons;
delete props.showText;
$( "<button></button>", props )
.button({
icons: props.icons,
text: props.showText
})
.button( buttonOptions )
.appendTo( that.uiButtonSet );
});
this.uiDialog.addClass( "ui-dialog-buttons" );

0 comments on commit ec1f1bd

Please sign in to comment.
You can’t perform that action at this time.