Search and Top Navigation
#5901 closed feature (fixed)
Opened August 04, 2010 08:31PM UTC
Closed September 01, 2016 02:02PM UTC
Apply additional class(es) to modal dialog's overlay div
Reported by: | josh3736 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.0 |
Component: | ui.dialog | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When creating a dialog, it is possible to specify custom class(es) to be added to the dialog (to facilitate additional theming):
$( ".selector" ).dialog({ dialogClass: 'alert' });
It would be nice if this class were added to the overlay
divin addition to the dialog's
divso that theming can be applied to the dialog's overlay background as well. For example, I might want the overlay to have a different pattern when I'm displaying a critical message versus an informational message.
With this change, I can just add to my CSS:
.ui-widget-overlay.critical-alert { background:red; }
...or whatever to help call attention to the fact this is an important message.
Possible regression: anyone who wasn't careful with their CSS selectors when theming custom-classed dialogs might find their overlay
divs look strange after upgrading. As an example, if I had:
.critical-alert { border:2px solid red; }
...then both the dialog and [now] the overlay will have a red border. However, if my selector was
.ui-dialog.critical-alert, then I'd be fine.
Attachments (0)
Change History (10)
Changed August 04, 2010 08:45PM UTC by comment:1
Changed June 26, 2012 01:22AM UTC by comment:2
type: | enhancement → feature |
---|
Changed October 11, 2012 09:02PM UTC by comment:4
milestone: | TBD → 1.10.0 |
---|
Changed October 15, 2012 07:12PM UTC by comment:5
status: | new → open |
---|
Changed January 25, 2013 09:23PM UTC by comment:6
milestone: | 1.10.0 → none |
---|
Changed January 29, 2013 03:12AM UTC by comment:7
Would it be better if there was a 2nd option for the overlay?
I am willing to tackle this after some clarification.
Changed January 29, 2013 01:46PM UTC by comment:9
blockedby: | → 7053 |
---|
Changed September 01, 2016 02:02PM UTC by comment:10
milestone: | none → 1.12.0 |
---|---|
resolution: | → fixed |
status: | open → closed |
summary: | Apply additional dialogClass(es) to modal dialog's overlay div → Apply additional class(es) to modal dialog's overlay div |
This is handled by the new classes
option.
I've implemented this enhancement with this patch: http://github.com/daguej/jquery-ui/blob/0c069112229272157c3af4838bac30301e486e2d/ui/jquery.ui.dialog.js