Getting this working was fairly straightforward. I had to modify myUMBC’s Perl HTML ‘table’ object so that it sets the headings apart from the body with
<tbody> tags. Then, I just added
At first, it didn’t work. It turns out the Standardista stuff doesn’t like any additional markup (text decoration, font tags, etc) within the heading tags. Once I got rid of the markup, it worked.
I also had to fiddle a bit to get the sorting to play nicely with my striped rows (alternating white and light gray). The Standardista code includes support for striping, but I had to change the way I was applying CSS to my table (move the
class attribute from the
<td> elements to the
<tr> elements), and I also tweaked the Standardista code to use my CSS attribute (
myumbcLightGray) instead of its own (
odd). With uPortal, I have to be sensitive to CSS namespace collision issues, and
odd was a bit too generic. Once I made these adjustments, my striping was preserved after sorting.
This is a really cool package and I highly recommend it for any table-sorting application.