editing css for cells
Can you help get me further along with this task?
I sort of asked it before, but I have a clearer understanding of things now.
OK…
When my columns load, I want to apply CSS to the cells (background and text colors) depending on the values in the fields.
Essentialy, I determine whether a Project is “late/complete”, “late/incomplete”, “on-time/complete” based on comparing two fields: Planned Date, and Actual Date (and sometimes factoring in current date).
First question…
Would a good way to do this be:
1) Generate JSON with the selector and classes
2) Use AJAX on page load to apply the styles? to every cell, even if the records aren’t loaded?
Secondly…
When a specific field (Actual Date) is edited from Admin Columns, I might have to re-apply the CSS styling…
What’s a good way?
I thought that I could possibly:
1) Pass the field name to an AJAX file (but how?)
2) Request the styles based on the field name (and doing the calculations based on other fields to determine the colors)
3) Overriding the cell’s styles
I know this is a big question… I just need some guidance in how I could do this in relation to Admin Columns. I will sort out the code and the WP-specific end of things myself.
Thanks in advance!
Back to watching the jQuery/AJAX course on Treehouse :)
You must be logged in to reply to this topic.