[Zope-CVS] CVS: Packages/Moztop/moztop/content - moztop.js:1.30
Stephan Richter
srichter@cbu.edu
Thu, 27 Mar 2003 11:46:05 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content
In directory cvs.zope.org:/tmp/cvs-serv8065/moztop/content
Modified Files:
moztop.js
Log Message:
Worked on jsdav quiet a bit. We now have initial support for PROPFIND,
MKCOL, GET, HEAD, DELETE, COPY, and MOVE; all without proper error
handling. Still missing is PROPPATCH, LOCK and UNLOCK.
See the beginning of the lib for a more detailed status report.
=== Packages/Moztop/moztop/content/moztop.js 1.29 => 1.30 ===
--- Packages/Moztop/moztop/content/moztop.js:1.29 Sun Mar 23 13:03:21 2003
+++ Packages/Moztop/moztop/content/moztop.js Thu Mar 27 11:45:34 2003
@@ -1,5 +1,3 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
/*****************************************************************************
*
* Copyright (c) 2002, 2003 Zope Corporation and Contributors.
@@ -36,13 +34,17 @@
}
function testDAV() {
+
+ client = new DavClient();
+
+ /*
pf = new PropFind();
pf.setAllProp();
- dump('\n\n'+pf.serialize());
+ //dump('\n\n'+pf.serialize());
pf = new PropFind();
pf.setPropName();
- dump('\n\n'+pf.serialize());
+ // dump('\n\n'+pf.serialize());
pf = new PropFind();
p1 = new Prop('foo.org');
@@ -53,7 +55,65 @@
p2.addProperty('foo');
p2.addProperty('blah');
pf.addProp(p2);
- dump('\n\n'+pf.serialize());
+ // dump('\n\n'+pf.serialize());
+
+ function callBack(stat, obj) {
+ alert(
+ stat.getResponses()[0].getPropStats()[0].getProp().getProperties()
+ );
+ }
+
+ pf = new PropFind();
+ pf.setPropName();
+ dump(pf.serialize()+'\n\n');
+ client.PROPFIND('http://localhost:9080/', pf, RESOURCE_DEPTH, callBack);
+
+ function callBack(mesg) {
+ alert(mesg);
+ }
+
+ client.MKCOL('http://localhost:9080/moztop1', callBack);
+
+ function callBack(req) {
+ alert(req.getResponseHeader('Date'));
+ }
+
+ client.HEAD('http://localhost:9080/moztop', callBack);
+
+
+ function callBack(text) {
+ alert(text);
+ }
+
+ client.GET('http://localhost:9080/moztop', callBack);
+
+
+ function callBack(stat) {
+ alert(stat);
+ }
+
+ client.DELETE('http://localhost:9080/moztop', callBack);
+
+
+ function callBack(stat) {
+ alert(stat);
+ }
+
+ client.COPY('http://localhost:9080/moztop',
+ 'http://localhost:9080/moztop_new',
+ null, ALLSUBS_DEPTH, true, callBack);
+
+ */
+
+ function callBack(stat) {
+ alert(stat);
+ }
+
+ client.MOVE('http://localhost:9080/moztop_new',
+ 'http://localhost:9080/moztop_move',
+ null, ALLSUBS_DEPTH, true, callBack);
+
+
}
/* Function that is executed when Moztop is started. */