#5425 closed bug (worksforme)
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: | [email protected]…, [email protected]… |
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); } }
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | jquery.ui.dialog.js added |
---|
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This looks like the 1.7.2 implementation. You're probably just not including the new button plugin.
comment:2 Changed 10 years ago by
Cc: | [email protected],[email protected] → [email protected], [email protected] |
---|---|
Milestone: | TBD |
Milestone TBD deleted
Note: See
TracTickets for help on using
tickets.
The file corrected whith the new method _createButtons