diff --git a/radicale/web/fn.js b/radicale/web/fn.js index 501352a..a436ae6 100644 --- a/radicale/web/fn.js +++ b/radicale/web/fn.js @@ -221,10 +221,6 @@ function get_collections(user, password, collection, callback) { description = calendardesc_element ? calendardesc_element.textContent : ""; } } - // Quirks - if (href === (displayname ? "/" + displayname + "/" : "/")) { - displayname = ""; - } var sane_color = color.trim(); if (sane_color) { var color_match = COLOR_RE.exec(sane_color); @@ -249,10 +245,14 @@ function get_collections(user, password, collection, callback) { } }; request.send('' + - '' + + '' + '' + '' + - '' + + '' + '' + '' + '' + diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 29bf72c..3aa9463 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -53,7 +53,8 @@ NAMESPACES = { "D": "DAV:", "CS": "http://calendarserver.org/ns/", "ICAL": "http://apple.com/ns/ical/", - "ME": "http://me.com/_namespace/"} + "ME": "http://me.com/_namespace/", + "RADICALE": "http://radicale.org/ns/"} NAMESPACES_REV = {} 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.text = _href(base_prefix, "/%s/" % collection.owner) 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"): if is_leaf: element.text = item.get_meta("D:displayname") or item.path