Work with UI team to bring the class templating feature for widgets #4630
Description
Look at adding this feature because it lets people easily control what classes are added at the widget level. This would let people remove default classes for classes or shadows, or add their own custom classes.
We should also look at extending the pattern suggested below by UI to allow the default swatch value to be set and maybe even control inheritance which are unique to mobile right now but since UI will adopt the mobile theme framework, this will be helpful for that too.
Info here:
http://bugs.jqueryui.com/ticket/7053
We should remove the hardcoding and add the ability to customize the style-related classes based on the functional classes.
Proposal based on idea from Doug Neiner:
'''
$( "#dialog" ).dialog({
classes: {
"ui-dialog": "ui-corner-top",
"ui-dialog-titlebar": "ui-corner-top awesome-fade-class"
"ui-dialog-buttonpane": null
}
});
'''
The classes option would map functional classes to additional style classes. The existing style classes would become the defaults and the user can completely override the style classes.
Use within a widget could be:
uiDialog.addClass( this._classes( "ui-dialog" ) );
where the call to ._classes() would return "ui-dialog ui-corner-top".