File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ $.widget("ui.dialog", {
376
376
377
377
if ( ! $ . isEmptyObject ( buttons ) ) {
378
378
$ . each ( buttons , function ( name , props ) {
379
- var click ;
379
+ var click , buttonOptions ;
380
380
props = $ . isFunction ( props ) ?
381
381
{ click : props , text : name } :
382
382
props ;
@@ -387,11 +387,14 @@ $.widget("ui.dialog", {
387
387
props . click = function ( ) {
388
388
click . apply ( that . element [ 0 ] , arguments ) ;
389
389
} ;
390
+ buttonOptions = {
391
+ icons : props . icons ,
392
+ text : props . showText
393
+ } ;
394
+ delete props . icons ;
395
+ delete props . showText ;
390
396
$ ( "<button></button>" , props )
391
- . button ( {
392
- icons : props . icons ,
393
- text : props . showText
394
- } )
397
+ . button ( buttonOptions )
395
398
. appendTo ( that . uiButtonSet ) ;
396
399
} ) ;
397
400
this . uiDialog . addClass ( "ui-dialog-buttons" ) ;
You can’t perform that action at this time.
0 commit comments