Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#3248 closed enhancement (worksforme)

ui.dialog enhancement request for title bar area

Reported by: shaorobics@… Owned by: Scott González
Priority: minor Milestone:
Component: ui.dialog Version: 1.6b
Keywords: close text Cc:
Blocked by: Blocking:



We're in the process of switching from another library to jQuery. I'm trying to make use of the ui.dialog features but notice something is missing.

Basically, we are able to customize the title text in the title bar but we are unable to customize text for the close link itself.

Also, because our sites are bilingual and each page can have multiple dialogs depending on user actions, it wouldn't be elegant to pass in the title option as a string since we only have one intermediate function to open the dialog.

So what I'm thinking that would make sense in cases as such would be, if the markup were something like:

<div id="dialog1" class="dialog">

<div id="titleBar1" class="titleBar">

<span id="titleText1" class="titleText">This is a Unique Title for Dialog 1</span> <span id="closeText1" class="closeText">Close Window</span>

</div> <p>

This is the body content for the dialog



then the corresponding dialog call could be something like:

$("#dialog").dialog({title:$("#titleText1"), closeText:$("#closeText1"), ....})

meaning the title option and the closeText option could accept either a string or an object - in which case, it'll figure out the innerHTML and use that.

Another feature that isn't in jQuery, is the ability to add custom functions to the close button of the dialog (unless I'm mistaken...I am new :))

Basically not all our dialogs simply "close" the overlay. In some scenarios if the user closes the dialog, then we need to run a specific function to do additional things. Would these enhancements be possible to do or do they make sense?

I guess we're desperate to find out because we're in the early stages of the transition and are unable to continue until these features become available, or at least if there is an alternative to what we need.

Thanks in advance!


Change History (3)

comment:1 Changed 11 years ago by Shao

Sorry, I selected the wrong version. It's 1.6b not 1.5.2

Thanks! Shao

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

Priority: blockerminor
Resolution: worksforme
Status: newclosed

There are already multiple ways to specify the title for dialogs: the title attribute on the content element and the title option.

Also, you can specify a callback to run on close using the close option, and you can also bind functions to the dialogclose event.

Modifications to the close button won't be supported until we add layouts to jQuery UI.

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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.