From a26d90d8d7af2f9b6ec7bc084decec9c74dde5fe Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 22 Jul 2017 21:25:38 +0200 Subject: [PATCH] Web interface: Delete empty properties --- radicale/web/fn.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/radicale/web/fn.js b/radicale/web/fn.js index 2a47b80..0333494 100644 --- a/radicale/web/fn.js +++ b/radicale/web/fn.js @@ -339,14 +339,24 @@ function create_edit_collection(user, password, collection, create, callback) { '' + '' + (create ? '' + resourcetype + '' : '') + - '' + components + '' + - '' + displayname + '' + - '' + calendar_color + '' + - '' + addressbook_color + '' + - '' + addressbook_description + '' + - '' + calendar_description + '' + + (components ? '' + components + '' : '') + + (displayname ? '' + displayname + '' : '') + + (calendar_color ? '' + calendar_color + '' : '') + + (addressbook_color ? '' + addressbook_color + '' : '') + + (addressbook_description ? '' + addressbook_description + '' : '') + + (calendar_description ? '' + calendar_description + '' : '') + '' + '' + + (!create ? ('' + + '' + + (!components ? '' : '') + + (!displayname ? '' : '') + + (!calendar_color ? '' : '') + + (!addressbook_color ? '' : '') + + (!addressbook_description ? '' : '') + + (!calendar_description ? '' : '') + + '' + + ''): '') + ''); return request; }