-
-
Save jzaefferer/de5b87e33a5a03c33e60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js | |
index b9f73e9..ea5226a 100644 | |
--- a/ui/jquery.ui.dialog.js | |
+++ b/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" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment