Add selection and column sortActive/sortDirection observation support. (Thanks, David!)

This commit is contained in:
rjc%netscape.com 1999-03-09 01:54:46 +00:00
parent 26dc64ba44
commit c71c49a1cf
2 changed files with 24 additions and 3 deletions

View File

@ -38,4 +38,16 @@ treehead treeitem treecell {
background-color: #a0a0a0;
border: thin black solid;
}
treecell[selectedcell] {
background-color: yellow;
}
treecell[sortActive="true"] {
background-color: #404040;
}
treecol[sortActive="true"] {
background-color: green;
}

View File

@ -64,9 +64,18 @@ function doSort(sortColName)
<xul:treehead>
<xul:treeitem>
<xul:treecell resource='http://home.netscape.com/NC-rdf#Name' onclick="return doSort('NameColumn');">Name</xul:treecell>
<xul:treecell resource='http://home.netscape.com/NC-rdf#URL' onclick="return doSort('URLColumn');">URL</xul:treecell>
<xul:treecell resource='http://home.netscape.com/WEB-rdf#LastModifiedDate' onclick="return doSort('LastModColumn');">Last Modified</xul:treecell>
<xul:treecell resource='http://home.netscape.com/NC-rdf#Name' onclick="return doSort('NameColumn');">
<xul:observes element="NameColumn" attribute="sortActive"/>
<xul:observes element="NameColumn" attribute="sortDirection"/>
Name</xul:treecell>
<xul:treecell resource='http://home.netscape.com/NC-rdf#URL' onclick="return doSort('URLColumn');">
<xul:observes element="URLColumn" attribute="sortActive"/>
<xul:observes element="URLColumn" attribute="sortDirection"/>
URL</xul:treecell>
<xul:treecell resource='http://home.netscape.com/WEB-rdf#LastModifiedDate' onclick="return doSort('LastModColumn');">
<xul:observes element="LastModColumn" attribute="sortActive"/>
<xul:observes element="LastModColumn" attribute="sortDirection"/>
Last Modified</xul:treecell>
</xul:treeitem>
</xul:treehead>