[Zope-CVS] CVS: Packages/MoZTop/content/zopetop/StatusBar - StatusBarOverlay.xul:1.1 TaskManager.js:1.1 TasksOverlay.xul:1.1 TransactionsOverlay.xul:1.1 errors.gif:1.1 task.gif:1.1
Stephan Richter
srichter@cbu.edu
Thu, 18 Apr 2002 01:02:28 -0400
Update of /cvs-repository/Packages/MoZTop/content/zopetop/StatusBar
In directory cvs.zope.org:/tmp/cvs-serv32648/content/zopetop/StatusBar
Added Files:
StatusBarOverlay.xul TaskManager.js TasksOverlay.xul
TransactionsOverlay.xul errors.gif task.gif
Log Message:
This is the original Mozilla ZopeTop code, Paul and I came up over the
weekend, when I was in Fredricksburg. We will use this code as base to
develop a couple of proof of concept screens.
=== Added File Packages/MoZTop/content/zopetop/StatusBar/StatusBarOverlay.xul ===
<?xml version="1.0"?>
<?xul-overlay href="chrome://zopetop/content/StatusBar/TasksOverlay.xul"?>
<?xul-overlay href="chrome://zopetop/content/StatusBar/TransactionsOverlay.xul"?>
<overlay id="StatusBarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tabbox id="statusbar"
orient="horizontal"
align="start"
style="padding: 5px;">
<tabs orient="vertical">
<tab label=""
style="border: 3px solid;
border-right: 0px;
border-bottom-width: 3px;
-moz-border-top-colors: #000000 #DFE2E6 #D0D7DD;
-moz-border-right-colors: #C7D0D9 #C7D0D9 #C7D0D9;
-moz-border-bottom-colors: #000000 #98A7B5;
-moz-border-left-colors: #000000 #90A0B0 #98A7B5;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomleft: 3px;
width: 24px;
height: 24px;
background: url('chrome://zopetop/content/StatusBar/task.gif');
background-repeat: no-repeat;
background-position: center center;"/>
<tab label=""
style="border: 3px solid;
border-right: 0px;
border-bottom-width: 3px;
-moz-border-top-colors: #000000 #DFE2E6 #D0D7DD;
-moz-border-right-colors: #C7D0D9 #C7D0D9 #C7D0D9;
-moz-border-bottom-colors: #000000 #98A7B5;
-moz-border-left-colors: #000000 #90A0B0 #98A7B5;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomleft: 3px;
width: 24px;
height: 24px;
background: url('chrome://zopetop/content/StatusBar/errors.gif');
background-repeat: no-repeat;
background-position: center center;"/>
</tabs>
<tabpanels style="border-top: 3px solid;
border-left: 1px solid;
-moz-border-top-colors: #000000 #DFE2E6 #D0D7DD;
"
flex="1">
<tabpanel id="mailtab"
orient="vertical"
height="100"
flex="1">
<outliner id="TaskList"/>
</tabpanel>
<tabpanel id="newstab">
<box id="transactions"/>
</tabpanel>
</tabpanels>
</tabbox>
</overlay>
=== Added File Packages/MoZTop/content/zopetop/StatusBar/TaskManager.js ===
var RDF =
Components
.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
var DS =
Components
.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"]
.createInstance(Components.interfaces.nsIRDFDataSource);
function initTaskList() {
addTask('init', 'Initial Task', 'done');
// Add the datasource to the outliner
var outliner = document.getElementById("TaskList");
outliner.database.AddDataSource(DS);
outliner.setAttribute("ref", "urn:tasks:root");
}
// This will remember the index of the last child we've added
var taskCount = 0;
function addTask(name, description, status) {
// Add a new child urn:tasks:1.x beneath urn:tasks:1.
DS.Assert(RDF.GetResource("urn:tasks:" + taskCount),
RDF.GetResource("http://home.netscape.com/NC-rdf#taskid"),
RDF.GetLiteral(taskCount),
true);
DS.Assert(RDF.GetResource("urn:tasks:" + taskCount),
RDF.GetResource("http://home.netscape.com/NC-rdf#name"),
RDF.GetLiteral(name),
true);
DS.Assert(RDF.GetResource("urn:tasks:" + taskCount),
RDF.GetResource("http://home.netscape.com/NC-rdf#descr"),
RDF.GetLiteral(description),
true);
DS.Assert(RDF.GetResource("urn:tasks:" + taskCount),
RDF.GetResource("http://home.netscape.com/NC-rdf#status"),
RDF.GetLiteral(status),
true);
DS.Assert(RDF.GetResource("urn:tasks:root"),
RDF.GetResource("http://home.netscape.com/NC-rdf#child"),
RDF.GetResource("urn:tasks:" + taskCount),
true);
++taskCount;
}
function deleteTask(taskid) {
DS.Unassert(RDF.GetResource("urn:tasks:root"),
RDF.GetResource("http://home.netscape.com/NC-rdf#child"),
RDF.GetResource("urn:tasks:" + taskid),
true);
}
function deleteLatestTask() {
deleteTask(taskCount-1);
}
=== Added File Packages/MoZTop/content/zopetop/StatusBar/TasksOverlay.xul ===
<?xml version="1.0"?>
<overlay id="TasksOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<outliner flex="1" id="TaskList" datasources="rdf:null"
flags="dont-build-content"
containment="http://home.netscape.com/NC-rdf#child">
<outlinercols>
<outlinercol id="taskid" flex="1" label="Id" sort="?taskid"
primary="true" />
<splitter/>
<outlinercol id="name" label="Name" sort="?name" flex="2"/>
<splitter/>
<outlinercol id="description" label="Description" sort="?descr" flex="10"/>
<splitter/>
<outlinercol id="status" label="Status" sort="?status" flex="3"/>
</outlinercols>
<template>
<rule>
<conditions>
<outlineritem uri="?uri" />
<member container="?uri" child="?task" />
</conditions>
<bindings>
<binding subject="?task"
predicate="http://home.netscape.com/NC-rdf#taskid"
object="?taskid" />
<binding subject="?task"
predicate="http://home.netscape.com/NC-rdf#name"
object="?name" />
<binding subject="?task"
predicate="http://home.netscape.com/NC-rdf#descr"
object="?descr" />
<binding subject="?task"
predicate="http://home.netscape.com/NC-rdf#status"
object="?status" />
</bindings>
<action>
<outlinerchildren>
<outlineritem uri="?task">
<outlinerrow>
<outlinercell label="?taskid" />
<outlinercell label="?name" />
<outlinercell label="?descr" />
<outlinercell label="?status" />
</outlinerrow>
</outlineritem>
</outlinerchildren>
</action>
</rule>
</template>
</outliner>
</overlay>
=== Added File Packages/MoZTop/content/zopetop/StatusBar/TransactionsOverlay.xul ===
<?xml version="1.0"?>
<overlay id="TransactionsOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<box id="transactions"
orient="vertical"
flex="1">
<outliner id="transaction-grid" flex="1"
datasources="tasks.rdf"
ref="urn:tasks:data">
<outlinercols>
<outlinercol id="taskid" label="Task Id" flex="2"/>
<splitter/>
<outlinercol id="description" label="Description" flex="10"/>
<splitter/>
<outlinercol id="progress" label="Progress" flex="3"/>
</outlinercols>
<template>
<rule>
<conditions>
<content uri="?list"/>
<member container="?list" child="?child"/>
<triple subject="?child"
predicate="http://www.zope.org/rdf#taskid"
object="?taskid"/>
</conditions>
<bindings>
<binding subject="?child"
predicate="http://www.zope.org/rdf#taskid"
object="?taskid"/>
<binding subject="?child"
predicate="http://www.zope.org/rdf#description"
object="?description"/>
<binding subject="?child"
predicate="http://www.zope.org/rdf#progress"
object="?progress"/>
</bindings>
<action>
<outlinerchildren>
<outlineritem uri="?child">
<outlinerrow>
<outlinercell label="?taskid"/>
<outlinercell label="?description"/>
<outlinercell label="?progress"/>
</outlinerrow>
</outlineritem>
</outlinerchildren>
</action>
</rule>
</template>
</outliner>
<box orient="horizontal">
<spacer flex="100%"/>
<button label="Undo" />
<button label="Redo" />
<button label="Dismiss" />
<button label="Retrieve" />
</box>
</box>
</overlay>
=== Added File Packages/MoZTop/content/zopetop/StatusBar/errors.gif ===
<Binary-ish file>
=== Added File Packages/MoZTop/content/zopetop/StatusBar/task.gif ===
<Binary-ish file>