[Zope-CVS] CVS: Packages/Moztop/moztop/content/lib - jsdav.js:1.12
Stephan Richter
srichter@cbu.edu
Tue, 1 Apr 2003 08:02:37 -0500
Update of /cvs-repository/Packages/Moztop/moztop/content/lib
In directory cvs.zope.org:/tmp/cvs-serv9378/moztop/content/lib
Modified Files:
jsdav.js
Log Message:
More tests and bug fixes.
=== Packages/Moztop/moztop/content/lib/jsdav.js 1.11 => 1.12 === (936/1036 lines abridged)
--- Packages/Moztop/moztop/content/lib/jsdav.js:1.11 Sun Mar 30 14:45:15 2003
+++ Packages/Moztop/moztop/content/lib/jsdav.js Tue Apr 1 08:02:06 2003
@@ -131,6 +131,16 @@
const DAV_RESOURCE_DEPTH = '0';
const DAV_CHILDREN_DEPTH = '1';
const DAV_INFINITY_DEPTH = 'infinity';
+
+const DAV_TIMETYPE_SECOND = 'Second-';
+const DAV_TIMETYPE_INFINITE = 'Infinite';
+const DAV_TIMETYPE_EXTEND = 'Extend';
+
+const DAV_SHARED_LOCKSCOPE = 'shared';
+const DAV_EXCLUSIVE_LOCKSCOPE = 'exclusive';
+
+const DAV_WRITE_LOCKTYPE = 'write';
+
const xml_decl = '<?xml version="1.0" encoding="utf-8" ?>\n'
/* WebDAV Status Code Extensions
@@ -726,7 +736,7 @@
},
createXML: function(parent, doc) {
- node = doc.createElementNS('DAV:', 'activelock');
+ var node = doc.createElementNS('DAV:', 'activelock');
parent.appendChild(node);
node.appendChild(this.lockscope.createXML(node, doc));
node.appendChild(this.locktype.createXML(node, doc));
@@ -764,7 +774,7 @@
this.value = node.firstChild.nodeValue;
},
createXML: function(parent, doc) {
- node = doc.createElementNS('DAV:', 'depth');
+ var node = doc.createElementNS('DAV:', 'depth');
parent.appendChild(node);
node.appendChild(doc.createTextNode(this.value));
}
@@ -802,60 +812,70 @@
}
},
createXML: function(parent, doc) {
- node = doc.createElementNS('DAV:', 'locktoken');
+ var node = doc.createElementNS('DAV:', 'locktoken');
parent.appendChild(node);
this.href.createXML(node, doc);
},
}
-function Timeout(value, unit) {
[-=- -=- -=- 936 lines omitted -=- -=- -=-]
createXML: function(parent, doc) {
- node = doc.createElementNS('DAV:', 'supportedlock');
+ var node = doc.createElementNS('DAV:', 'supportedlock');
for (var index = 0; index < this.entries.length; index++) {
this.entries[index].createXML(node, doc);
}
@@ -1924,8 +1966,7 @@
function DavWrongTypeError(expected, received) {
- /* Handles invalid depth value errors. The constructor accepts the
- false value. */
+ /* Handles wrong object type errors. */
this.expected = expected;
this.received = received;
}
@@ -1934,5 +1975,33 @@
serialize: function() {
return ("Expected object type to be [" + this.expected + "], but is [" +
this.received + "].");
+ }
+}
+
+
+function DavInvalidScopeValueError(value) {
+ /* Handles invalid scope value errors. The constructor accepts the
+ false value. */
+ this.value = value;
+}
+
+DavInvalidScopeValueError.prototype = {
+ serialize: function() {
+ return ("The value '" + this.value + "' is not a valid scope. Use " +
+ "one of the following values instead: shared, exclusive");
+ }
+}
+
+
+function DavInvalidLockTypeError(value) {
+ /* Handles invalid lock type value errors. The constructor accepts the
+ false value. */
+ this.value = value;
+}
+
+DavInvalidLockTypeError.prototype = {
+ serialize: function() {
+ return ("The lock type '" + this.value + "' is not valid. Use " +
+ "one of the following values instead: write");
}
}