Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#6185 closed feature (notabug)

Dialog doesnt have ability to have custom buttons

Reported by: abhishekdev Owned by: abhishekdev
Priority: major Milestone:
Component: ui.dialog Version: 1.8.5
Keywords: Dialog Button Cc:
Blocked by: Blocking:


I have custom icon buttons using <div> and dont want to use the default jQuery UI Dialog buttons. There is no way I can achive this by the dialog initialization commands.

Temporarily I am passing by buttons as content. Cloning them and replacing the jQuery Dialog buttons with them when the dialog opens

Bug 1: Event namespaces on the cloned buttons vanishes.

Bug 2: The resizing logic is based on the jQuery buttons height, rather than the actual contents height. (Workaround: Override the default button height with that of custom button)

Change History (8)

comment:1 Changed 12 years ago by Scott González

Can you explain why you don't want to use the button widget?

comment:2 Changed 12 years ago by Scott González

Owner: set to abhishekdev
Status: newpending

comment:3 Changed 12 years ago by abhishekdev

Status: pendingnew

In the application i work on, we have custom styled iconized (size changes based on dialog type) buttons, and they have corresponding classes (JS Classes) to control their behavior. jQuery UI Buttons does not suffice for us. However jQuery UI Dialog with some custom styling has been suiting our needs well (if not all). We require to place buttons on left as well on right edge of the dialog. The button widget itself has so many styling (esp. V-align ) bugs due to the inherent nature of HTML elements it uses to structure itself.

What I think: Dialog should give a choice to use jQuery UI Buttons OR custom markup (for the entire button bar). In the latter case the Dialog algo should just care about the sizing logic regarding the button bar (i.e during dialog resizes).

The current logic makes Dialog's good and simple but not customizable to work with components that have many more behaviors and style posiibilities than jQueryUI buttons.

comment:4 Changed 12 years ago by Scott González

What would the API look like? You can already inject whatever markup you want into the dialog after it's created and it will be accounted for when calculating the size.

comment:5 Changed 12 years ago by Scott González

Example of injecting a custom button pane:,html

comment:6 Changed 12 years ago by Scott González

Status: newpending

comment:7 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:8 Changed 11 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.