diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-11 11:37:21 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-11 11:37:21 -0400 |
commit | fc1168253538585d2a187ec83909f548367053b1 (patch) | |
tree | 1f9a2d61c1581452ebace9649b52dec1a90923f9 | |
parent | WIP: newEvent has full UID now (diff) | |
download | radicaleinfcloud-fc1168253538585d2a187ec83909f548367053b1.tar.gz radicaleinfcloud-fc1168253538585d2a187ec83909f548367053b1.tar.bz2 radicaleinfcloud-fc1168253538585d2a187ec83909f548367053b1.zip |
WIP: uploaded event is clickable! But...
when you view/edit the object, the "Calendar" drop-down is not
pre-populated. The user can select the calendar, but then upon saving
it gets duplicated in the global list. Also, it is possible that
newlines can get mangled and then refused by the server?
-rw-r--r-- | radicale_infcloud/web/data_process.js | 5 | ||||
-rw-r--r-- | radicale_infcloud/web/interface.js | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/radicale_infcloud/web/data_process.js b/radicale_infcloud/web/data_process.js index 3862e73..05892e8 100644 --- a/radicale_infcloud/web/data_process.js +++ b/radicale_infcloud/web/data_process.js @@ -761,7 +761,7 @@ function getvCalendarstart(inputEvent) { var vcalendar_element='', itsOK=false; - var vEvent=inputEvent.vcalendar; + var vEvent=inputEvent.vcalendar.replace(/\r*\n+/gm,'\r\n'); if(vEvent.match(vCalendar.pre['vcalendar'])) { vcalendar_element=vEvent.match(vCalendar.pre['beginVTODO']); @@ -7888,7 +7888,8 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew) var recurrence_id_array=new Array(); /* FINDTHIS matching for BEGIN:VEVENT */ // this one works, but has 3 replace calls! - vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n'); + //vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n'); + vcalendarOrig = vcalendarOrig.replace(/\r*\n+/gm,'\r\n'); while(vcalendarOrig.match(vCalendar.pre['vevent'])!=null) { if(vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VEVENT')-2, vcalendarOrig.indexOf('BEGIN:VEVENT'))=='\r\n') diff --git a/radicale_infcloud/web/interface.js b/radicale_infcloud/web/interface.js index 7f9b06f..8ea4777 100644 --- a/radicale_infcloud/web/interface.js +++ b/radicale_infcloud/web/interface.js @@ -1330,6 +1330,7 @@ function uploadFile(fileContents) // When returnFullUID is true (last parameter), it returns "http://username@server/radicale/username/CALID/hex.ics" // But unfortunately the globalEventList.events[rid] still does not populate with this. //newEvent.id = inputUID + newUID + ".ics"; + newEvent.vcalendar = newEvent.vcalendar.replace(/\r*\n+/gm,'\r\n'); newEvent.id = putVcalendarToCollection(coll.accountUID, inputUID, "", fileContents, "", 'vevent', false, false, "", true); console.log("FINDTHIS"); return newEvent; |