You're right: there is a bug in the tabular view in which if there's a 
row template, then the rowStyler function is called with the TBODY 
element instead of the TR element corresponding to the row. You can hack 
around it as I've done in this example:

http://people.csail.mit.edu/dfhuynh/misc/tabular-view/presidents.html

Note the line
    tr = tr.rows[index + 1];
That hack seems to work on Firefox 3, Google Chrome, and IE 8 on Windows.


There is also a bug in the database code that causes the 
database.getAllItems() to return 4 extra bogus items. I've checked in a 
fix, but it won't be released just yet. So for now, to work around it, 
you'd need to include this code after linking to exhibit-api.js:

    <script>
    Exhibit.Database._Impl.prototype.getAllItems = function() {
        var ret = new Exhibit.Set();
        var self = this;
       
        this._items.visit(function(item) {
            if (!self.isSubmission(item)) {
                ret.add(item);
            }
        });

        return ret;
    };
    </script>
   
Please let me know if that works for you.

David


Yee-Ting Li wrote:
> On 14 Dec 2008, at 16:47, David Huynh wrote:
>   
>> I'm not seeing rowStyler anymore...
>>     
>
> 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.
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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