Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#2433 closed enhancement (fixed)

Ability to pass a class name to a Dialog

Reported by: natecavanaugh Owned by: rdworth
Priority: minor Milestone: 1.5
Component: ui.dialog Version: 1.5b4
Keywords: Cc:
Blocked by: Blocking:

Description

It would be great if for dialogs you had the ability to pass a css class name that would be applied to the outermost container of the dialog.

This simple ability would allow you to give different dialogs different looks and feels based on whatever class name you passed in. I would also allow either the passing in of an array, or multiple space separated classes so that you can further namespace it.

For example, let's say you have an alert dialog, but it's also an alert that passes in a warning. You could do cssClass: 'alert warning' or cssClass: ['alert', 'warning'].

Space separated classes are generally better for maintenance rather than .warning-alert, .info-alert, etc.

Change History (7)

comment:1 Changed 12 years ago by natecavanaugh

Whoops, sorry Paul, I meant to mark this as an enhancement.

comment:2 Changed 12 years ago by paul

Owner: changed from paul to rworth

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

Type: bugenhancement

comment:4 Changed 12 years ago by (none)

Milestone: 1.2.4

Milestone 1.2.4 deleted

comment:5 Changed 12 years ago by paul

Component: ui.coreui.dialog
Version: 1.2.31.5b4

comment:6 Changed 12 years ago by rdworth

Milestone: 1.5
Status: newaccepted

comment:7 Changed 12 years ago by rdworth

Resolution: fixed
Status: acceptedclosed

This was added (rev [136]) as an option, dialogClass. Example

$(el).dialog({ dialogClass: 'alert warning' });

Note: See TracTickets for help on using tickets.