aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.dialog.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-22 10:39:45 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-26 10:28:25 +0100
commitec1f1bde76c555e7643899c5bbbb200353f780ea (patch)
tree85ebe6ba480c8a7d557a85d9eb3d784ff57413e1 /ui/jquery.ui.dialog.js
parenta09f5c07f591d0ef198f1a36fab9d4b6061ecbc6 (diff)
downloadjquery-ui-ec1f1bde76c555e7643899c5bbbb200353f780ea.tar.gz
jquery-ui-ec1f1bde76c555e7643899c5bbbb200353f780ea.zip
Dialog: Follow-up to c77ca67 - exclude button options from properties to create the button.
Diffstat (limited to 'ui/jquery.ui.dialog.js')
-rw-r--r--ui/jquery.ui.dialog.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index b9f73e954..ea5226ac5 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" );