[Zope-CVS] CVS: Packages/Moztop/moztop/content/StatusBar - TaskManager.js:1.3
Stephan Richter
srichter@cbu.edu
Wed, 15 Jan 2003 23:12:04 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content/StatusBar
In directory cvs.zope.org:/tmp/cvs-serv10029/moztop/content/StatusBar
Modified Files:
TaskManager.js
Log Message:
- Major code cleanup:
o Removed unused files.
o Added Headers to Javascript files.
o Reorganized Javascript a bit. However, there is still enough left
to do.
o Added Documentation strings.
- Finally got Connection Wizard working.
=== Packages/Moztop/moztop/content/StatusBar/TaskManager.js 1.2 => 1.3 ===
--- Packages/Moztop/moztop/content/StatusBar/TaskManager.js:1.2 Mon Jan 13 21:43:48 2003
+++ Packages/Moztop/moztop/content/StatusBar/TaskManager.js Wed Jan 15 23:11:31 2003
@@ -1,9 +1,28 @@
+/*****************************************************************************
+*
+* Copyright (c) 2002, 2003 Zope Corporation and Contributors.
+* All Rights Reserved.
+*
+* This software is subject to the provisions of the Zope Public License,
+* Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+* WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+* FOR A PARTICULAR PURPOSE.
+*
+******************************************************************************
+Library to handle Task Manager.
+
+$Id$
+
+******************************************************************************/
+/* Initialize Tasks datasource. */
var tasks_source =
Components
.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"]
.createInstance(Components.interfaces.nsIRDFDataSource);
-
+/* Initialize the data in the tree object. */
function initTaskList() {
var tree = document.getElementById("tasks-tree");
tree.database.AddDataSource(tasks_source);
@@ -11,9 +30,10 @@
addTask('init', 'Initial Task', 'done');
}
-// This will remember the index of the last child we've added
+/* This will remember the index of the last child we've added. */
var taskCount = 0;
+/* Add a task to the manager. */
function addTask(name, descr, status) {
tasks_source.Assert(RDF.GetResource("urn:tasks:task" + taskCount),
RDF.GetResource("http://www.zope.org/rdf/task#id"),
@@ -43,6 +63,7 @@
++taskCount;
}
+/* Delete a task from the manager. */
function deleteSelectedTask() {
var tree = document.getElementById("tasks-tree");
var start = new Object();