Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Dialog: added options to the buttons for icons. Fixed #6830 - Allow Icons to be specified for Dialog buttons #423

wants to merge 1 commit into from

5 participants


This is an absolut must-have! Thanks for doing the code! I really hope this will be worked into jquery-ui, as I really hate this nasty .find('button:contains("Cancel") stuff.

EDIT: Oh, one more thing: What about additional implementing 'lable' and 'disabled' options, like it is used in the jquery-ui-button plugin ( Would make sense, at least 'lable'.

Thanks again!



It looks like you linked to the wrong jsbin for your demo. Also, it looks like this will default to not showing text for buttons, since showText will default to being undefined.


Sorry about the demo have recreated it here.
If showText is defaulting to false it doesn't seem to be having an impact on the results.

Could have sworn that disabled was working any way.


That demo page doesn't work either.


Well this one definitely works, have tested in IE, FF, Chrome, Opera and Safari


@djQuery, can you please update this pull request to address @scottgonzalez's concerns mentioned here: #423 (comment)

Also, could you possibly add some unit tests supporting this change and make sure the demo page you linked to works?


Implemented the fix for #6830 in c77ca67 along with a test, inside the dialog branch, see #794.

@jzaefferer jzaefferer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 5, 2011
  1. @djQuery

    Dialog: added options to the buttons for icons. Fixed #6830 - Allow I…

    djQuery authored
    …cons to be specified for Dialog buttons
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  ui/jquery.ui.dialog.js
2  ui/jquery.ui.dialog.js
@@ -360,7 +360,7 @@ $.widget("ui.dialog", {
.appendTo( uiButtonSet );
if ( $.fn.button ) {
- button.button();
+ button.button({icons: props.icons, text: props.showText});
self.uiDialog.addClass( "ui-dialog-buttons" );
Something went wrong with that request. Please try again.