[Zope-CVS] CVS: Packages/Moztop/moztop/content - moztop.js:1.16
Paul Everitt
paul@zope.com
Thu, 30 Jan 2003 14:02:00 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content
In directory cvs.zope.org:/tmp/cvs-serv12949/content
Modified Files:
moztop.js
Log Message:
No longer a need to copy files to profile dir. We now create the files in
place. Also, if there are no sites yet defined, the explorer says so.
=== Packages/Moztop/moztop/content/moztop.js 1.15 => 1.16 ===
--- Packages/Moztop/moztop/content/moztop.js:1.15 Thu Jan 30 07:14:59 2003
+++ Packages/Moztop/moztop/content/moztop.js Thu Jan 30 14:01:28 2003
@@ -49,38 +49,4 @@
'For more information see http://www.zope.org/')
}
-/* Initialize the Explorer datasource */
-function initExplorer() {
- // var ds = RDF.GetDataSource(RDF_BASE + '@@contents.rdf');
- // var tree = document.getElementById('navigationtree');
- // tree.database.AddDataSource(ds);
- // tree.setAttribute("ref", "urn:explorer:data");
-
- var prefsdir = getProfileURL();
- var sitesds = new RDFDataSource(prefsdir + "/moztop_sites.rdf");
- var typesds = new RDFDataSource(prefsdir + "/moztop_types.rdf");
-
- var explorer=document.getElementById("explorertree");
- explorer.database.AddDataSource(sitesds.getRawDataSource());
- explorer.database.AddDataSource(typesds.getRawDataSource());
- explorer.builder.rebuild();
-}
-
-/* Reload Explorer datasource */
-function reloadContentData() {
- var tree = document.getElementById('navigationtree');
- var sources = tree.database.GetDataSources();
- sources.getNext(); // Hack, we should find this out in a better way.
- var ds = sources.getNext();
- ds = ds.QueryInterface(
- Components.interfaces.nsIRDFRemoteDataSource);
- ds.Refresh(false);
- /* We need this alert, so the RDF has time to load, otherwise the tree
- will be empty. We have find a better way of doing this.
-
- This happens because the DS is loaded asynchronically.
- */
- alert('Done reloading Content Tree.');
- tree.builder.rebuild();
-}