[Zope-CVS] CVS: Packages/Moztop/moztop/content/StatusBar - TaskManager.js:1.2 TasksOverlay.xul:1.2
Stephan Richter
srichter@cbu.edu
Mon, 13 Jan 2003 21:43:52 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content/StatusBar
In directory cvs.zope.org:/tmp/cvs-serv17260/moztop/content/StatusBar
Modified Files:
TaskManager.js TasksOverlay.xul
Log Message:
Made Zope 3-based content RDF apply to Paul's structure changes and
made refresh work again. Unfortunately it is a big hack right now.
Also, Adding and deleting Sites should work, but it does not, but no
errors are thrown... I am lost there.
=== Packages/Moztop/moztop/content/StatusBar/TaskManager.js 1.1.1.1 => 1.2 ===
--- Packages/Moztop/moztop/content/StatusBar/TaskManager.js:1.1.1.1 Sun Jan 12 17:30:15 2003
+++ Packages/Moztop/moztop/content/StatusBar/TaskManager.js Mon Jan 13 21:43:48 2003
@@ -1,9 +1,4 @@
-var RDF =
- Components
- .classes["@mozilla.org/rdf/rdf-service;1"]
- .getService(Components.interfaces.nsIRDFService);
-
-var DS =
+var tasks_source =
Components
.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"]
.createInstance(Components.interfaces.nsIRDFDataSource);
@@ -11,7 +6,7 @@
function initTaskList() {
var tree = document.getElementById("tasks-tree");
- tree.database.AddDataSource(DS);
+ tree.database.AddDataSource(tasks_source);
tree.setAttribute("ref", "urn:tasks:data");
addTask('init', 'Initial Task', 'done');
}
@@ -20,32 +15,31 @@
var taskCount = 0;
function addTask(name, descr, status) {
- DS.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
+ tasks_source.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
RDF.GetResource("http://www.zope.org/rdf/task#id"),
RDF.GetLiteral(taskCount),
true);
- DS.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
+ tasks_source.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
RDF.GetResource("http://www.zope.org/rdf/task#name"),
RDF.GetLiteral(name),
true);
- DS.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
+ tasks_source.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
RDF.GetResource("http://www.zope.org/rdf/task#descr"),
RDF.GetLiteral(descr),
true);
- DS.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
+ tasks_source.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
RDF.GetResource("http://www.zope.org/rdf/task#status"),
RDF.GetLiteral(status),
true);
- DS.Assert(RDF.GetResource("urn:tasks:data"),
+ tasks_source.Assert(RDF.GetResource("urn:tasks:data"),
RDF.GetResource("http://www.zope.org/rdf/task#child"),
RDF.GetResource("urn:tasks:task" + taskCount),
true);
- // Write it all out.
++taskCount;
}
@@ -62,7 +56,7 @@
var builder = tree.builder.QueryInterface(
Components.interfaces.nsIXULTreeBuilder)
rdf = builder.getResourceAtIndex(v)
- DS.Unassert(RDF.GetResource("urn:tasks:data"),
+ tasks_source.Unassert(RDF.GetResource("urn:tasks:data"),
RDF.GetResource("http://www.zope.org/rdf/task#child"),
RDF.GetResource(rdf.Value));
}
=== Packages/Moztop/moztop/content/StatusBar/TasksOverlay.xul 1.1.1.1 => 1.2 ===
--- Packages/Moztop/moztop/content/StatusBar/TasksOverlay.xul:1.1.1.1 Sun Jan 12 17:30:15 2003
+++ Packages/Moztop/moztop/content/StatusBar/TasksOverlay.xul Mon Jan 13 21:43:48 2003
@@ -3,8 +3,6 @@
<overlay id="TasksOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<!--"chrome://moztop/content/Data/tasks.rdf"-->
-<!-- ref="urn:tasks:data" -->
<tree id="tasks-tree" flex="1"
datasources="rdf:null"
flags="dont-build-content"