vendredi 19 décembre 2014

Reset or remove all added css classes (ExtJS 4.2.x)

What's the best way to "reset" or "remove all" user-added css classes without manually tracking what css class/es were previously added?

My usecase is that I have a text field called Sales Order Number, in which text-color of both label and field should change color (red, green, black, orange, blue) depending on the status (new, approved, rejected, pending, on-hold).


My option before was to use setFieldStyle (overwrite same style declarations) for the text field but I guess it's neat to use css class instead (if other styles will be added in the future).


If there is no other convenient way than to use setFieldStyle, then what is the approach to do "setLabelStyle"?






Reset or remove all added css classes (ExtJS 4.2.x)

Aucun commentaire:

Enregistrer un commentaire