Search and Top Navigation
#5425 closed bug (worksforme)
Opened March 25, 2010 11:19AM UTC
Closed March 26, 2010 01:16AM UTC
Last modified October 11, 2012 09:15PM UTC
In the version query-ui-1.8 the dialog buttons lose the styles.
Reported by: | gaizkile | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.dialog | Version: | 1.8 |
Keywords: | buttons css lost | Cc: | gruiz@ikt.es, scabria@ikt.es |
Blocked by: | Blocking: |
Description
When you open a dialog,the buttons within the dialog pane lose the styles except the hover styles. To solve this problem you need to change the method in the file jquery.ui.dialog.js where the dialog are created. In the next lines it will be shown the lines of the new method corrected.
_createButtons: function(buttons) { var self = this, hasButtons = false, uiDialogButtonPane = $('<div></div>') .addClass( 'ui-dialog-buttonpane ' + 'ui-widget-content ' + 'ui-helper-clearfix' ); // if we already have a button pane, remove it this.uiDialog.find('.ui-dialog-buttonpane').remove(); (typeof buttons == 'object' && buttons !== null && $.each(buttons, function() { return !(hasButtons = true); })); if (hasButtons) { $.each(buttons, function(name, fn) { $('<button type="button"></button>') .addClass( 'ui-state-default ' + 'ui-corner-all' ) .text(name) .click(function() { fn.apply(self.element[0], arguments); }) .hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ) .focus(function() { $(this).addClass('ui-state-focus'); }) .blur(function() { $(this).removeClass('ui-state-focus'); }) .appendTo(uiDialogButtonPane); }); uiDialogButtonPane.appendTo(this.uiDialog); } }
This looks like the 1.7.2 implementation. You're probably just not including the new button plugin.