Opened 11 years ago

Closed 11 years ago

#4213 closed enhancement (wontfix)

TitlebarButtons

Reported by: patrick232 Owned by:
Priority: minor Milestone: 1.7
Component: ui.dialog Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:

Description

hey there,

id like to have an option quite similar to the buttons-option, but not to create buttons in the buttons-pane. I want to add some buttons in the Titlebar.

I did some hacking on the ui.dialog.js and got it working for my purposes (see the attached my_ui.dialog.js). Anyway its _far_ away from ready to use, just want to know if you would do it the same way.

I added the option "titlebarbuttons" and changed the css-class of the close-button from ui-dialog-titlebar-close to ui-dialog-titlebar-button as I add this class to every button which will be added to the Titlebar. The TitlebarButtons will be added with the _createTitlebarButtons function.

css:

.ui-dialog-titlebar-button {float:right;} 

js:

$('.selector').dialog({titlebarbuttons:{"button1":function(){}},"button2":function(){}});

Anyway I didnt further patching, without asking for your thoughts on this enhancement and how to implement it - so my file is very ugly :p

Attachments (1)

my_ui.dialog.js (17.1 KB) - added by patrick232 11 years ago.
_very initial_ try to implement an option for adding buttons to the titlebar

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by patrick232

Attachment: my_ui.dialog.js added

_very initial_ try to implement an option for adding buttons to the titlebar

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

Milestone: TBD1.7
Resolution: wontfix
Status: newclosed

Adding additional buttons in the titlebar is not common enough for us to support. If you want to do this, you should just manually add the buttons after creating the dialog.

Note: See TracTickets for help on using tickets.