Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added list of allowed options for dialog buttons

  • Loading branch information...
commit 1055c03fcdfea914a97a8997c59f1f96dc89f3a7 1 parent 56e836b
Dmitry V. Alexeev authored November 16, 2012

Showing 1 changed file with 8 additions and 5 deletions. Show diff stats Hide diff stats

  1. 13  ui/jquery.ui.dialog.js
13  ui/jquery.ui.dialog.js
@@ -334,7 +334,7 @@ $.widget("ui.dialog", {
334 334
 		}
335 335
 		if ( hasButtons ) {
336 336
 			$.each( buttons, function( name, props ) {
337  
-				var button, click, opts;
  337
+				var button, click, options;
338 338
 				props = $.isFunction( props ) ?
339 339
 					{ click: props, text: name } :
340 340
 					props;
@@ -345,11 +345,14 @@ $.widget("ui.dialog", {
345 345
 				props.click = function() {
346 346
 					click.apply( that.element[0], arguments );
347 347
 				};
348  
-				opts = {};
349  
-				if (props.icons) {
350  
-					opts.icons = props.icons;
351  
-					delete props.icons;
  348
+				options = {};
  349
+				optionsList = ["icons","disabled","showText", "label"];
  350
+				for ( var i in optionsList) {
  351
+					if (props[optionsList[i]]) {
  352
+						options[optionsList[i]] = props[optionsList[i]];
  353
+						delete props[optionsList[i]];
352 354
 					}
  355
+				}
353 356
 				button = $( "<button></button>", props )
354 357
 					.appendTo( that.uiButtonSet );
355 358
 				if ( $.fn.button ) {

0 notes on commit 1055c03

Please sign in to comment.
Something went wrong with that request. Please try again.