changeset 214:0e841edf6c39

The tree is sortable now.
author slarti
date Thu, 25 Mar 2004 19:58:12 +0100
parents 8e4724b71b67
children b5d395331f24
files xul/alcatraz.jar xul/alcatraz.xpi xul/content/alcatraz.xul xul/content/annota.js xul/content/annota.xul xul/content/tree.xul
diffstat 6 files changed, 27 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
Binary file xul/alcatraz.jar has changed
Binary file xul/alcatraz.xpi has changed
--- a/xul/content/alcatraz.xul	Thu Mar 25 17:45:31 2004 +0100
+++ b/xul/content/alcatraz.xul	Thu Mar 25 19:58:12 2004 +0100
@@ -13,17 +13,17 @@
  </tabs>
  <tabpanels flex="1">
   <tabpanel id="navigio_tab">
-   <tabbox flex="1">    
+   <tabbox flex="1">
      <iframe id="navigio_frame" src="navigio.xul" flex="1" />
    </tabbox>
   </tabpanel>
   <tabpanel id="imago_tab" selected="true">
-   <tabbox flex="1">    
+   <tabbox flex="1">
      <iframe id="imago_frame" src="imago.xul" flex="1" />
    </tabbox>
   </tabpanel>
   <tabpanel id="annota_tab" orient="vertical">
-   <tabbox flex="1">  
+   <tabbox flex="1">
      <iframe id="annota_frame" src="annota.xul" flex="1" />
    </tabbox>
   </tabpanel>
--- a/xul/content/annota.js	Thu Mar 25 17:45:31 2004 +0100
+++ b/xul/content/annota.js	Thu Mar 25 19:58:12 2004 +0100
@@ -87,6 +87,7 @@
 
 function refreshTree(){
 	this.rdfTree = new RDFTree(this.TREE_ID);
+	this.rdfTree.doSort('name');
 	this.rdfTree.rebuild();
 }
 
@@ -394,6 +395,7 @@
 		this.createComplexRDFEntry(urn);
 		dataSource.save();
 		refreshTree();
+
 	} else{
 		alert("Error: no alcatraz component. can't create an annotation.");
 	}
--- a/xul/content/annota.xul	Thu Mar 25 17:45:31 2004 +0100
+++ b/xul/content/annota.xul	Thu Mar 25 19:58:12 2004 +0100
@@ -15,8 +15,8 @@
 
 <!-- ANNOTA -->
  <tabpanel id="annota_tab" orient="vertical">
-   <vbox flex="1">
-    <hbox flex="1">
+   <vbox flex="1" >
+    <hbox>
       <toolbarbutton id="annota_file" type="menu" label="File">
        <menupopup id="file_popup">
         <menuitem label="Save" onclick="quickSave()"/>
@@ -43,20 +43,30 @@
       </toolbarbutton>
      </hbox>
 
-	<tree id="annotation_tree" flex="100" datasources="rdf:null" ref="urn:echo" ondblclick="tree_click()"
-	 height="100%">
+	<tree id="annotation_tree" flex="1" datasources="rdf:null" ref="urn:echo" ondblclick="tree_click()"
+	  height="300" width="100" flags="dont-build-content">
 
       <treecols id="cols">
-		<treecol id="name" label="Name" primary="true" flex="10"/>
-		<treecol id="pagenumber" label="Page" flex="1"/>
-		<treecol id="url" label="URL" hidden="true" flex="5"/>
-		<treecol id="created" label="Created" hidden="true" flex="5"/>
+		<treecol id="name" label="Name" primary="true" flex="10"
+		    class="sortDirectionIndicator" sortActive="true"
+            sortDirection="ascending"
+            sort="rdf:http://purl.org/dc/elements/1.0/title"/>
+	    <splitter/>
+		<treecol id="pagenumber" label="Page" flex="1"
+		    class="sortDirectionIndicator"
+            sort="rdf:http://echo.unibe.ch/digilib/rdf#pn"/>
+		<treecol id="url" label="URL" hidden="true" flex="5"
+		    class="sortDirectionIndicator"
+            sort="rdf:http://echo.unibe.ch/digilib/rdf#fn"/>
+		<treecol id="created" label="Created" hidden="true" flex="5"
+		    class="sortDirectionIndicator"
+            sort="rdf:http://www.w3.org/2000/10/annotation-ns#created"/>
       </treecols>
 
       <template>
 		<rule>
-    	  <treechildren flex="1" >
-			<treeitem uri="rdf:*" persist="open">
+    	  <treechildren>
+			<treeitem uri="rdf:*">
 			  <treerow>
 				<treecell id="nameHeader" label="rdf:http://purl.org/dc/elements/1.0/title"/>
 				<treecell id="pagenumberHeader" label="rdf:http://echo.unibe.ch/digilib/rdf#pn"/>
@@ -68,7 +78,6 @@
 		</rule>
       </template>
     </tree>
-
    </vbox>
   </tabpanel>
 </window>
--- a/xul/content/tree.xul	Thu Mar 25 17:45:31 2004 +0100
+++ b/xul/content/tree.xul	Thu Mar 25 19:58:12 2004 +0100
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
 <window id="example-window" title="Example 6.8.2"
@@ -8,13 +7,12 @@
 
 <script  language="JavaScript" src="tree.js" />
 
-<tree  id="menu_tree" onselect="open_link();" flex="1" width="200" height="200"
+<tree id="menu_tree" onselect="open_link();" flex="1" width="200" height="200"
       datasources="http://hera.unibe.ch:8080/alcatraz/xul/echonavigation.jsp" ref="urn:echonavigation:data">
 
   <treecols>
-    <treecol id="name" label="Name" primary="true" flex="1"/>
+	<treecol id="name" label="Name" primary="true" flex="1"/>
   </treecols>
-
   <template>
     <rule>
       <treechildren>
@@ -25,10 +23,7 @@
        </treeitem>
       </treechildren>
     </rule>
-
   </template>
 </tree>
-
-
 </window>