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
i'm attempting the rowStyler method. i'm using the exhibit trunk from
svn.
a couple of things;
- i always appear to get 4 extra blank rows on all table views in IE;
but not with firefox
- the database.getObject(item, 'last_seen') returns a null in IE but
is fine in firefox
Yee.
David
Hi, i've updated the same files to not include the <h3/> tag... still
the same :(
relating to the IE issue of the 4 empty rows; it appears to also be
related to this <table/> tag within the tabular view. if you look at
the same two sites with IE, the four rows are present when we have the
<table/> tag, but it's perfectly good when we don't use it.
cheers,
Yee.
>> http://www.slac.stanford.edu/~ytl/exhibit/ports.html
>> http://www.slac.stanford.edu/~ytl/exhibit/ports-notsorted.html
David
About the extra 4 rows in IE, I'm not sure what the problem is, but I'd
suggest one thing: there are extra spaces in many of the labels in your
data, e.g.,
"label":" 1",
Note the spaces in front of 1. You should remove those spaces and see if
that helps.
David
that is correct, i removed the styler to demonstrate that that if i
removed the <table/> element from within the <div ex:role="view"
ex:viewClass="Tabular"/> i can no longer have customisable sorting of
columns.
as i mentioned on the previous email, the rowStyler works only when
there is no <table/> tag within the <div> (otherwise it appears to
colour the entire table)
> "label":" 1",
> Note the spaces in front of 1. You should remove those spaces and
> see if
> that helps.
i changed the json to remove the whitespaces; looking at:
http://www.slac.stanford.edu/~ytl/exhibit/ports.html
... i still get the 4 erroneous rows.
it is *ONLY* if i remove the <table/> def in the <div> that the rows
do not appear:
http://www.slac.stanford.edu/~ytl/exhibit/ports-notsorted.html
so it appears to be that we have three separate bugs that are caused
by the same <table/> tag with the <div/>:
1) i can not get customisable sorting of the 'port' column /unless/ i
have the <table/> tag
2) the rowStyler does not work for independent rows when i have the
<table/> tag
and
3) i always get 4 erroneous empty rows in IE when i use the <table/>
tag.
Cheers,
Yee.
On 14 Dec 2008, at 22:39, David Huynh wrote:
> Note the line
> tr = tr.rows[index + 1];
> That hack seems to work on Firefox 3, Google Chrome, and IE 8 on
> Windows.
yep; works great :) will this be fixed on the svn trunk?
> Exhibit.Database._Impl.prototype.getAllItems = function() {
works great too :)
i remember a while back i pointed you to a display bug involving the
lenses on a table view; basically if the table width was too wide for
the browser display, then the lens would popup at the top of the page,
often off screen if the table list is long. did you have a chance to
look into this?
keep up the great work ;)
Yee.