[Zope-CVS] CVS: Packages/Moztop/moztop/content/Explorer - Explorer.js:1.8
Paul Everitt
paul@zope.com
Thu, 20 Feb 2003 12:07:09 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content/Explorer
In directory cvs.zope.org:/tmp/cvs-serv2301/d/Explorer
Modified Files:
Explorer.js
Log Message:
XBL refactored. We now have a composite widget with child widgets.
The child widget for listing folder contents has a constructor that
knows how to attach a datasource and display the folder contents. Also,
the composite widget knows how to grab the tabbox parent and add a
tab.
Next: create some more widgets for edit, preview, properties, security,
etc.
=== Packages/Moztop/moztop/content/Explorer/Explorer.js 1.7 => 1.8 ===
--- Packages/Moztop/moztop/content/Explorer/Explorer.js:1.7 Tue Feb 18 10:36:38 2003
+++ Packages/Moztop/moztop/content/Explorer/Explorer.js Thu Feb 20 12:06:37 2003
@@ -162,6 +162,32 @@
p.send(null);
}
+
+SitesManager.prototype.PUT=function (puturl, putcontent)
+{
+ var p = new XMLHttpRequest();
+
+ function myfunc (e) {
+ if (p.responseXML) {
+
+ var s = new XMLSerializer();
+ var d = p.responseXML;
+ var str = s.serializeToString(d);
+
+ dump("\nmade it in PUT\n" + str + "\n");
+ }
+ }
+
+ p.onload = myfunc;
+ p.open("PUT",puturl);
+ p.setRequestHeader("Content-type", "text/plain");
+ p.setRequestHeader("Host","localhost");
+ p.send(putcontent);
+
+ return;
+}
+
+
SitesManager.prototype.addSite=
function (site_name, site_realm, site_url,
site_username, site_password)
@@ -224,18 +250,21 @@
var rdf = this.getSelectedResource();
var resourcetitle = rdf.getTarget(this.titleprop).getValue();
- // todo: stop hardcoding the element to 'sitetabpanel'
+ // todo: stop hard coding sitetabpanel'
// var resourcetype = rdf.getTarget(this.resourcetypeprop);
//var resourcetypetitle = resourcetype.getTarget(this.titleprop).getValue();
+ dump("\n in openSelectedResource\n");
var resourcetype = "site";
- var tp = document.createElement("sitetabpanel");
+ var tp = document.createElement("folderviewer");
tp.id = "127";
tp.setAttribute("urn","124");
tp.setAttribute("resourcetitle",resourcetitle);
var outter = document.getElementById("active-contents-tabpanels");
outter.appendChild(tp);
+
+ dump("\n out of openSelectedResource\n");
return;
}