[Zope-CVS] CVS: Packages/Moztop/moztop/content/Inspector - Sites.js:1.8 SitesOverlay.xul:1.7 rdfds.js:NONE

Stephan Richter srichter@cbu.edu
Wed, 15 Jan 2003 23:12:00 -0500


Update of /cvs-repository/Packages/Moztop/moztop/content/Inspector
In directory cvs.zope.org:/tmp/cvs-serv10029/moztop/content/Inspector

Modified Files:
	Sites.js SitesOverlay.xul 
Removed Files:
	rdfds.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/Inspector/Sites.js 1.7 => 1.8 ===
--- Packages/Moztop/moztop/content/Inspector/Sites.js:1.7	Tue Jan 14 11:29:04 2003
+++ Packages/Moztop/moztop/content/Inspector/Sites.js	Wed Jan 15 23:11:27 2003
@@ -1,9 +1,24 @@
-var RDF = Components
-  .classes["@mozilla.org/rdf/rdf-service;1"]
-  .getService(Components.interfaces.nsIRDFService);
+/*****************************************************************************
+*
+* 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 manage Sites RDF datasource.
 
+$Id$
+
+******************************************************************************/
 var sites_source = new RDFDataSource();
 	
+/* Initialize Sites Datasource using the rdfds library. */
 function initSites() {
     /* Sample RDF string that sets the format of the RDF source. */
     var sample = '<?xml version="1.0"?>' +
@@ -30,7 +45,7 @@
     tree.builder.rebuild();
 }
 
-
+/* Add a site to the datasource. */
 function addSite(servername, serverport, username, password) {
     var sites = sites_source.getNode("urn:sites:data");
     var newsite = sites_source.getNode("urn:sites:data:" + servername);
@@ -43,6 +58,7 @@
     alert(sites_source.serializeToString());
 }
 
+/* Delete a site from the datasource. */
 function deleteSelectedSite() {
     var tree = document.getElementById("sites-tree");
     // source = tree.database.GetDataSources


=== Packages/Moztop/moztop/content/Inspector/SitesOverlay.xul 1.6 => 1.7 ===
--- Packages/Moztop/moztop/content/Inspector/SitesOverlay.xul:1.6	Tue Jan 14 20:26:37 2003
+++ Packages/Moztop/moztop/content/Inspector/SitesOverlay.xul	Wed Jan 15 23:11:27 2003
@@ -3,45 +3,41 @@
 <overlay id="SitesOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-<script type="application/x-javascript" 
-        src="chrome://moztop/content/Inspector/rdfds.js"/>
-<script type="application/x-javascript" 
-        src="chrome://moztop/content/Inspector/Sites.js"/>
-
-<tabpanel id="sites-panel">
-
-<button onclick="addSite('test5.com', '8081', 'stephan', 'bar');" 
-        label="Add Site" />
-<button onclick="deleteSelectedSite();" label="Delete Site" />
-
-<tree id="sites-tree" flex="1" 
-      datasources="rdf:null"
-      flags="dont-build-content" ref="urn:sites:data"
-      containment="http://www.zope.org/rdf/site#child">
-  <treecols>
-    <treecol id="servername" label="Server Name" primary="true" flex="10"/>
-    <splitter/>
-    <treecol id="serverport" label="Port" flex="1"/>
-    <splitter/>
-    <treecol id="username" label="Username" flex="1"/>
-  </treecols>
-
-    <template>
-      <rule>
-        <treechildren flex="1">
-          <treeitem uri="rdf:*">
-            <treerow>
-              <treecell label="rdf:http://www.zope.org/rdf/site#servername"/>
-              <treecell label="rdf:http://www.zope.org/rdf/site#serverport"/>
-              <treecell label="rdf:http://www.zope.org/rdf/site#username"/>
-            </treerow>
-          </treeitem>
-        </treechildren>
-      </rule>
-    </template>
-</tree>
-
-</tabpanel>
+  <script type="application/x-javascript" 
+          src="chrome://moztop/content/rdfds.js"/>
+  <script type="application/x-javascript" src="Sites.js"/>
+
+  <tabpanel id="sites-panel">
+
+  <button onclick="deleteSelectedSite();" label="Delete Site" />
+
+  <tree id="sites-tree" flex="1" 
+        datasources="rdf:null"
+        flags="dont-build-content" ref="urn:sites:data"
+        containment="http://www.zope.org/rdf/site#child">
+    <treecols>
+      <treecol id="servername" label="Server Name" primary="true" flex="10"/>
+      <splitter/>
+      <treecol id="serverport" label="Port" flex="1"/>
+      <splitter/>
+      <treecol id="username" label="Username" flex="1"/>
+    </treecols>
+
+      <template>
+        <rule>
+          <treechildren flex="1">
+            <treeitem uri="rdf:*">
+              <treerow>
+                <treecell label="rdf:http://www.zope.org/rdf/site#servername"/>
+                <treecell label="rdf:http://www.zope.org/rdf/site#serverport"/>
+                <treecell label="rdf:http://www.zope.org/rdf/site#username"/>
+              </treerow>
+            </treeitem>
+          </treechildren>
+        </rule>
+      </template>
+  </tree>
 
+  </tabpanel>
 
 </overlay>

=== Removed File Packages/Moztop/moztop/content/Inspector/rdfds.js ===