[Zope-CVS] CVS: Packages/MoZTop/content/zopetop - zopetop.js:1.3 zopetop.xul:1.2
Christian Theune
ct@gocept.com
Fri, 7 Jun 2002 14:38:50 -0400
Update of /cvs-repository/Packages/MoZTop/content/zopetop
In directory cvs.zope.org:/tmp/cvs-serv12642/content/zopetop
Modified Files:
zopetop.js zopetop.xul
Log Message:
- added the tree outliner as observer to the datasource, for change notification
(doesn't work currently, as the datasources never changes ...)
- added experimental reloadContentData for reloading the content datasource ...
but also doesn't work currently
- removed the notebook containing the explorer, properties and sites tab,
staying only with the explorer now
=== Packages/MoZTop/content/zopetop/zopetop.js 1.2 => 1.3 ===
var RDF = null;
var myDatasource = null;
+//var myDatasourceURL = "file:///usr/local/mozilla/chrome/zopetop/content/zopetop/Data/foldercontents.rdf"
+//var myDatasourceURL = "chrome://zopetop/content/zopetop/Data/foldercontents.rdf"
+var myDatasourceURL = "http://pegasus/~ctheune/foldercontents.rdf"
function startProgram() {
setupExplorerDS();
@@ -8,7 +11,7 @@
}
function closeProgram() {
-
+
}
@@ -37,17 +40,20 @@
var ExplorerRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
- var ds = ExplorerRDF.GetDataSource("chrome://zopetop/content/zopetop/Data/foldercontents.rdf");
+ var ds = ExplorerRDF.GetDataSource(myDatasourceURL);
+
+ //var remote =
+ //ds.QueryInterface(Components.interfaces.nsIRDDataSource);
-// var remote =
-// ds.QueryInterface(Components.interfaces.nsIRDDataSource);
+ //var sink =
+ // ds.QueryInterface(Components.interfaces.nsIRDFXMLSink);
+ // sink.addXMLSinkObserver(ExplorerObserver);
-// var sink =
-// ds.QueryInterface(Components.interfaces.nsIRDFXMLSink);
-// sink.addXMLSinkObserver(ExplorerObserver);
outliner = document.getElementById('explorer');
+ ds.AddObserver(outliner.builder);
outliner.database.AddDataSource(ds);
+
}
@@ -86,3 +92,12 @@
}
+
+function reloadContentData(){
+ var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
+ .getService(Components.interfaces.nsIRDFService);
+
+ // Get the datasource.
+ var ds = RDF.GetDataSource(myDatasourceURL);
+ ds.Refresh(0);
+}
=== Packages/MoZTop/content/zopetop/zopetop.xul 1.1 => 1.2 ===
<?xul-overlay href="chrome://zopetop/content/Menu/ToolBarOverlay.xul"?>
-<?xul-overlay href="chrome://zopetop/content/Inspector/InspectorOverlay.xul"?>
+<?xul-overlay href="chrome://zopetop/content/Inspector/ExplorerOverlay.xul"?>
<?xul-overlay href="chrome://zopetop/content/Main/MainOverlay.xul"?>
<?xul-overlay href="chrome://zopetop/content/StatusBar/StatusBarOverlay.xul"?>
@@ -38,10 +38,10 @@
</toolbox>
<box orient="horizontal" flex="10">
- <tabbox id="inspector"/>
- <splitter collapse="before">
- <spacer flex="1"/><grippy/><spacer flex="1"/>
- </splitter>
+ <tree id="explorer"/>
+ <splitter collapse="before" />
+ <!-- <spacer flex="1"/><grippy/><spacer flex="1"/>
+ </splitter> -->
<box id="main" />
</box>