1999-02-10 22:15:46 +03:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<?xml-stylesheet href="sidebar.css" type="text/css"?>
|
|
|
|
|
|
|
|
<xul:window
|
|
|
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
xmlns:html="http://www.w3.org/TR/REC-html40"
|
|
|
|
xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#">
|
|
|
|
|
1999-02-26 05:16:56 +03:00
|
|
|
<html:script>
|
|
|
|
|
|
|
|
function doSort(node)
|
|
|
|
{
|
|
|
|
// determine column resource to sort on
|
|
|
|
var sortResource = node.getAttribute('resource');
|
|
|
|
if (!node) return(false);
|
|
|
|
dump("Sort on '" + sortResource + "' column.\n");
|
|
|
|
|
|
|
|
// get RDF Core service
|
|
|
|
var rdfCore = XPAppCoresManager.Find("RDFCore");
|
|
|
|
if (!rdfCore)
|
|
|
|
{
|
|
|
|
dump(" *** error: RDFCore not found.\n");
|
|
|
|
|
|
|
|
rdfCore = new RDFCore();
|
|
|
|
if (!rdfCore)
|
|
|
|
{
|
|
|
|
dump(" *** error: Unable to create new RDFCore.\n");
|
|
|
|
return(false);
|
|
|
|
}
|
|
|
|
dump("RDFCore created\n");
|
|
|
|
|
|
|
|
rdfCore.Init("RDFCore");
|
|
|
|
dump("RDFCore inited\n");
|
|
|
|
|
|
|
|
XPAppCoresManager.Add(rdfCore);
|
|
|
|
dump("RDFCore added into XPAppCoresManager\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
// sort!!!
|
|
|
|
dump("About to sort...\n");
|
|
|
|
rdfCore.doSort(node, sortResource, "ascending");
|
|
|
|
dump("Sort done.\n");
|
|
|
|
|
|
|
|
return(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
</html:script>
|
|
|
|
|
1999-02-26 05:04:28 +03:00
|
|
|
<xul:tree xul:datasources="rdf:files rdf:bookmarks rdf:mail">
|
1999-02-10 22:15:46 +03:00
|
|
|
<xul:treecol rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
|
|
|
<xul:treecol rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
|
|
|
|
<xul:treecol rdf:resource="http://home.netscape.com/WEB-rdf#LastModifiedDate"/>
|
|
|
|
<xul:treehead>
|
|
|
|
<xul:treeitem>
|
1999-02-26 05:16:56 +03:00
|
|
|
<xul:treecell xul:resource='http://home.netscape.com/NC-rdf#Name' html:onClick="return doSort(this);">Name</xul:treecell>
|
|
|
|
<xul:treecell xul:resource='http://home.netscape.com/NC-rdf#URL' html:onClick="return doSort(this);">URL</xul:treecell>
|
|
|
|
<xul:treecell xul:resource='http://home.netscape.com/WEB-rdf#LastModifiedDate' html:onClick="return doSort(this);">Last Modified</xul:treecell>
|
1999-02-10 22:15:46 +03:00
|
|
|
</xul:treeitem>
|
|
|
|
</xul:treehead>
|
|
|
|
|
|
|
|
<xul:treebody>
|
|
|
|
<xul:treeitem xul:id="NC:PersonalToolbarFolder" xul:open="true">
|
|
|
|
<xul:treechildren>
|
|
|
|
|
|
|
|
<xul:treeitem>
|
|
|
|
<xul:treecell>
|
|
|
|
<xul:treeindentation/>Hard-<html:i>coded</html:i> <html:b>Item</html:b>
|
|
|
|
</xul:treecell>
|
|
|
|
<xul:treecell>http://blah.blah.com</xul:treecell>
|
|
|
|
|
|
|
|
<xul:treechildren>
|
|
|
|
<xul:treeitem>
|
|
|
|
<xul:treecell><xul:treeindentation/>
|
1999-02-12 11:13:45 +03:00
|
|
|
<html:img src="http://www.mozilla.org/images/logo-star.gif"/>
|
|
|
|
<html:i>Another</html:i> hard-coded <html:font color="green">item</html:font>
|
1999-02-10 22:15:46 +03:00
|
|
|
</xul:treecell>
|
|
|
|
<xul:treecell>http://moreblah.blah.com</xul:treecell>
|
|
|
|
</xul:treeitem>
|
|
|
|
</xul:treechildren>
|
|
|
|
|
|
|
|
</xul:treeitem>
|
|
|
|
|
|
|
|
</xul:treechildren>
|
|
|
|
</xul:treeitem>
|
|
|
|
|
|
|
|
<xul:treeitem xul:id="NC:BookmarksRoot">
|
|
|
|
<xul:treecell>Bookmarks</xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
</xul:treeitem>
|
|
|
|
|
1999-02-26 05:04:28 +03:00
|
|
|
<xul:treeitem xul:id="NC:FilesRoot">
|
|
|
|
<xul:treecell>File System</xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
</xul:treeitem>
|
|
|
|
|
1999-02-10 22:15:46 +03:00
|
|
|
<xul:treeitem xul:id="NC:MailRoot">
|
|
|
|
<xul:treecell>Mail</xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
<xul:treecell></xul:treecell>
|
|
|
|
</xul:treeitem>
|
|
|
|
</xul:treebody>
|
|
|
|
</xul:tree>
|
|
|
|
|
|
|
|
</xul:window>
|