yee379 wrote:
> hi, i have some data presented in an exhibit 'Tabular' view in which i
> wish to colour the background of each row based upon the age of the
> data for that row. i have a field called 'last_seen' which is a date
> string representing the age.
>
> i understand i should create an <div ex:role="coder"/> but i am at a
> loss of how to conduct the date comparisons.
>
> can anyone help?
>   
The tabular view actually doesn't work with coders. You'd need to use 
the rowStyler trick or a row template to color the rows yourself.

The presidents example uses the row template trick:
    http://simile.mit.edu/exhibit/examples/presidents/presidents-2.html
Look in the HTML code where it says
    ex:background-style-content="if(exists(.death), '#ccc', 'white')"

The rowStyler support is documented here
    http://simile.mit.edu/wiki/Exhibit/2.0/Tabular_View
You'd need something like this in the row styler function to get the 
last_seen field
    var lastSeen = database.getObject(item, 'last_seen'); // this is a 
string

David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to