Setting a specific css class to crudrestcontroller (tg 2.1.4)

8 views
Skip to first unread message

alonn

unread,
Dec 18, 2012, 7:02:55 AM12/18/12
to turbo...@googlegroups.com
I need to override the default sprox tableview css class for the columns. I don't need to change the template, because I need this only for a specific Model Controller I'm customizing. thanks for the help

Alessandro Molina

unread,
Dec 18, 2012, 8:41:18 AM12/18/12
to TurboGears .
The CrudRestController class has a "style" variable which is meant for custom CSS. The CSS you write there will be injected into the page in place of the default style.


On Tue, Dec 18, 2012 at 1:02 PM, alonn <alon...@gmail.com> wrote:
I need to override the default sprox tableview css class for the columns. I don't need to change the template, because I need this only for a specific Model Controller I'm customizing. thanks for the help

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To view this discussion on the web visit https://groups.google.com/d/msg/turbogears/-/s2pQ9jN-Ol4J.
To post to this group, send email to turbo...@googlegroups.com.
To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

alonn

unread,
Dec 18, 2012, 5:08:52 PM12/18/12
to turbo...@googlegroups.com
Thanks! could you give an example how should I use this? BTW I don't really need to inject specifc styles, What I'm actually trying to do is use the specific ID/CLASSes for Js manipulation.. 

Alessandro Molina

unread,
Dec 19, 2012, 4:33:52 AM12/19/12
to TurboGears .
On Tue, Dec 18, 2012 at 11:08 PM, alonn <alon...@gmail.com> wrote:
Thanks! could you give an example how should I use this? BTW I don't really need to inject specifc styles, What I'm actually trying to do is use the specific ID/CLASSes for Js manipulation.. 
 

As that is something declared into the template you have to replace the template itself if you want to change ids/classes.
If you want to edit the table classes you will also need to remplace the Widget used to render the table.
Reply all
Reply to author
Forward
0 new messages