Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Work with UI team to bring the class templating feature for widgets #4630

Closed
toddparker opened this issue Jun 30, 2012 · 11 comments
Closed

Work with UI team to bring the class templating feature for widgets #4630

toddparker opened this issue Jun 30, 2012 · 11 comments

Comments

@toddparker
Copy link
Contributor

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".

@toddparker
Copy link
Contributor Author

Moving this to 1.4 since we're going to be looking at markup and style changes globally then.

@ghost ghost assigned arschmitz Aug 14, 2013
@Ruffio
Copy link

Ruffio commented Sep 24, 2014

Shouldn't this issue be closed as implementation has already begun?

@ldeluca
Copy link
Contributor

ldeluca commented Oct 23, 2014

@toddparker @arschmitz I noticed that there hasn't been any movement on this issue in over 2 years. Is it still a problem with the latest jQM?

@arschmitz
Copy link
Contributor

@ldeluca actually there are pr's currently in both mobile and ui to fully implement this :) which have updates as recently as today :-) We just have not been updating this issue see branch ui-1-12 and all the classes prs for the mobile side and jquery/jquery-ui#1369 for ui.

@ldeluca
Copy link
Contributor

ldeluca commented Oct 23, 2014

@arschmitz Okay, sorry about that. Didn't see any pull requests in this issue itself so I assumed no movement.

@arschmitz
Copy link
Contributor

@ldeluca no problem this issue needed an update anyway

@gabrielschulhof
Copy link

@arschmitz one of the commits in ui-1-12 should be edited to fix this issue - perhaps the commit which updates external/jquery-ui/widgets.js. That way, we'd have the needed reference.

@gabrielschulhof gabrielschulhof added this to the 1.5.0 milestone Oct 24, 2014
@arschmitz
Copy link
Contributor

@gabrielschulhof no because no one commit fixes this. This is a tracking ticket it will have to be closed manually.

@scottgonzalez
Copy link
Contributor

@gabrielschulhof's suggestion of having the commit that updates jQuery UI close this ticket seems correct to me.

@arschmitz
Copy link
Contributor

If you both think thats the right way i'm fine with it

@arschmitz
Copy link
Contributor

This is landed already closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants