Add RADICALE:displayname property for raw displayname
Remove workaround from the web interface.
This commit is contained in:
parent
2c0669046c
commit
d9aafd154e
@ -221,10 +221,6 @@ function get_collections(user, password, collection, callback) {
|
|||||||
description = calendardesc_element ? calendardesc_element.textContent : "";
|
description = calendardesc_element ? calendardesc_element.textContent : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Quirks
|
|
||||||
if (href === (displayname ? "/" + displayname + "/" : "/")) {
|
|
||||||
displayname = "";
|
|
||||||
}
|
|
||||||
var sane_color = color.trim();
|
var sane_color = color.trim();
|
||||||
if (sane_color) {
|
if (sane_color) {
|
||||||
var color_match = COLOR_RE.exec(sane_color);
|
var color_match = COLOR_RE.exec(sane_color);
|
||||||
@ -249,10 +245,14 @@ function get_collections(user, password, collection, callback) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
request.send('<?xml version="1.0" encoding="utf-8" ?>' +
|
request.send('<?xml version="1.0" encoding="utf-8" ?>' +
|
||||||
'<propfind xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CR="urn:ietf:params:xml:ns:carddav" xmlns:I="http://apple.com/ns/ical/" xmlns:INF="http://inf-it.com/ns/ab/">' +
|
'<propfind xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" ' +
|
||||||
|
'xmlns:CR="urn:ietf:params:xml:ns:carddav" ' +
|
||||||
|
'xmlns:I="http://apple.com/ns/ical/" ' +
|
||||||
|
'xmlns:INF="http://inf-it.com/ns/ab/" ' +
|
||||||
|
'xmlns:RADICALE="http://radicale.org/ns/">' +
|
||||||
'<prop>' +
|
'<prop>' +
|
||||||
'<resourcetype />' +
|
'<resourcetype />' +
|
||||||
'<displayname />' +
|
'<RADICALE:displayname />' +
|
||||||
'<I:calendar-color />' +
|
'<I:calendar-color />' +
|
||||||
'<INF:addressbook-color />' +
|
'<INF:addressbook-color />' +
|
||||||
'<C:calendar-description />' +
|
'<C:calendar-description />' +
|
||||||
|
@ -53,7 +53,8 @@ NAMESPACES = {
|
|||||||
"D": "DAV:",
|
"D": "DAV:",
|
||||||
"CS": "http://calendarserver.org/ns/",
|
"CS": "http://calendarserver.org/ns/",
|
||||||
"ICAL": "http://apple.com/ns/ical/",
|
"ICAL": "http://apple.com/ns/ical/",
|
||||||
"ME": "http://me.com/_namespace/"}
|
"ME": "http://me.com/_namespace/",
|
||||||
|
"RADICALE": "http://radicale.org/ns/"}
|
||||||
|
|
||||||
NAMESPACES_REV = {}
|
NAMESPACES_REV = {}
|
||||||
for short, url in NAMESPACES.items():
|
for short, url in NAMESPACES.items():
|
||||||
@ -986,6 +987,13 @@ def _propfind_response(base_prefix, path, item, props, user, write=False,
|
|||||||
tag = ET.Element(_tag("D", "href"))
|
tag = ET.Element(_tag("D", "href"))
|
||||||
tag.text = _href(base_prefix, "/%s/" % collection.owner)
|
tag.text = _href(base_prefix, "/%s/" % collection.owner)
|
||||||
element.append(tag)
|
element.append(tag)
|
||||||
|
elif tag == _tag("RADICALE", "displayname"):
|
||||||
|
# Only for internal use by the web interface
|
||||||
|
displayname = item.get_meta("D:displayname")
|
||||||
|
if is_leaf and displayname is not None:
|
||||||
|
element.text = displayname
|
||||||
|
else:
|
||||||
|
is404 = True
|
||||||
elif tag == _tag("D", "displayname"):
|
elif tag == _tag("D", "displayname"):
|
||||||
if is_leaf:
|
if is_leaf:
|
||||||
element.text = item.get_meta("D:displayname") or item.path
|
element.text = item.get_meta("D:displayname") or item.path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user