[Zope-CVS] CVS: Packages/MoZTop/moztop/content/zopetop/StatusBar - StatusBarOverlay.xul:1.5 TaskManager.js:1.4

Stephan Richter srichter@cbu.edu
Thu, 9 Jan 2003 14:58:48 -0500


Update of /cvs-repository/Packages/MoZTop/moztop/content/zopetop/StatusBar
In directory cvs.zope.org:/tmp/cvs-serv8753/content/StatusBar

Modified Files:
	StatusBarOverlay.xul TaskManager.js 
Log Message:
Got Deletion of Tasks working.


=== Packages/MoZTop/moztop/content/zopetop/StatusBar/StatusBarOverlay.xul 1.4 => 1.5 ===
--- Packages/MoZTop/moztop/content/zopetop/StatusBar/StatusBarOverlay.xul:1.4	Thu Jan  9 01:18:54 2003
+++ Packages/MoZTop/moztop/content/zopetop/StatusBar/StatusBarOverlay.xul	Thu Jan  9 14:58:45 2003
@@ -51,7 +51,7 @@
                       "
                 flex="1">
       <tabpanel id="mailtab" orient="vertical" flex="1">
-<tree id="tasks-tree" flex="1" 
+<tree id="tasks-tree" flex="1" seltype="multiple"
       datasources="rdf:null"
       flags="dont-build-content"
       containment="http://www.zope.org/rdf/task#child">


=== Packages/MoZTop/moztop/content/zopetop/StatusBar/TaskManager.js 1.3 => 1.4 ===
--- Packages/MoZTop/moztop/content/zopetop/StatusBar/TaskManager.js:1.3	Thu Jan  9 05:44:44 2003
+++ Packages/MoZTop/moztop/content/zopetop/StatusBar/TaskManager.js	Thu Jan  9 14:58:45 2003
@@ -49,15 +49,6 @@
     ++taskCount;
 }
 
-function deleteTask(taskid) {
-    DS.Unassert(RDF.GetResource("urn:tasks:data"),
-                RDF.GetResource("http://www.zope.org/rdf/task#child"),
-                RDF.GetResource("urn:tasks:task" + taskid),
-                true);
-    DS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();
-    alert(11);
-}
-
 function deleteSelectedTask() {
     var tree = document.getElementById("tasks-tree");
     var start = new Object();
@@ -67,16 +58,13 @@
 
     for (var t=0; t<numRanges; t++){
         tree.view.selection.getRangeAt(t,start,end);
-        for (var v=start.value; v<=end.value; v++){
+        for (var v = start.value; v <= end.value; v++){
 	    var builder = tree.builder.QueryInterface(
                               Components.interfaces.nsIXULTreeBuilder)
-            source = builder.getResourceAtIndex(v)
-	    // XXX insert resource removal code here!!!
-            alert("Item "+v+" is selected.");
+            rdf = builder.getResourceAtIndex(v)
+            DS.Unassert(RDF.GetResource("urn:tasks:data"),
+                        RDF.GetResource("http://www.zope.org/rdf/task#child"),
+                        RDF.GetResource(rdf.Value));
         }
     }
-}
-
-function deleteLatestTask() {
-    deleteTask(taskCount-1);
 }