Skip to main content

Search and Top Navigation

#3248 closed enhancement (worksforme)

Opened August 22, 2008 09:33PM UTC

Closed August 27, 2008 12:13AM UTC

Last modified October 11, 2012 09:15PM UTC

ui.dialog enhancement request for title bar area

Reported by: Owned by: scottgonzalez
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>



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!


Attachments (0)
Change History (3)

Changed August 22, 2008 09:53PM UTC by Shao comment:1

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



Changed August 27, 2008 12:13AM UTC by scottgonzalez comment:2

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.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted