From bd956a97f8f102f338d6c546398c52ccef1d3af0 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Fri, 12 Aug 2022 09:50:37 -0400 Subject: restore putVcalendarToCollection, hide dl button And also improve code formatting and comments to match rest of project. --- radicale_infcloud/web/data_process.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'radicale_infcloud/web/data_process.js') diff --git a/radicale_infcloud/web/data_process.js b/radicale_infcloud/web/data_process.js index d562927..0e0df93 100644 --- a/radicale_infcloud/web/data_process.js +++ b/radicale_infcloud/web/data_process.js @@ -761,6 +761,8 @@ function getvCalendarstart(inputEvent) { var vcalendar_element='', itsOK=false; + // stackrpms,3 Handle not-to-spec upload of .ics file + // By adjusting line endings, this function can process the fileContents and make it visible on the current view. var vEvent=inputEvent.vcalendar.replace(/\r*\n+/gm,'\r\n'); if(vEvent.match(vCalendar.pre['vcalendar'])) { @@ -3443,7 +3445,7 @@ function getDateFromDay(objComponent, t, disableRecursion,uid) return {offsetFrom:objComponent.tzOffsetFROM, offsetTo: objComponent.tzOffsetTO, startDate: dayLightStartDate}; } -/* FINDTHIS */ +/* stackrpms: reference function */ function vcalendarToData(inputCollection, inputEvent, isNew) { var vcalendarOrig=inputEvent.vcalendar; @@ -3537,6 +3539,8 @@ function getDateFromDay(objComponent, t, disableRecursion,uid) vcalendar=vcalendar.replace(vcalendar_element[0],''); */ var recurrence_id_array=new Array(); + // stackrpms,3 Handle not-to-spec upload of .ics file + // By adjusting line endings, this function can process the fileContents and make it visible on the current view. vcalendarOrig = vcalendarOrig.replace(/\r*\n+/gm,'\r\n'); while(vcalendarOrig.match(vCalendar.pre['vevent'])!=null) { @@ -7797,8 +7801,6 @@ function normalizeVcard(vcardString) */ function stringToVevent(inputCollection, vstring, uid, etag, isNew) { - //vcalendarToData(inputCollection, inputEvent, isNew) - //var vcalendarOrig=inputEvent.vcalendar; var vcalendarOrig=vstring; var eventArray=new Array(); @@ -7884,15 +7886,8 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew) vcalendar=vcalendarOrig.substring(0, beginTimeZone)+vcalendarOrig.substring(endTimeZone, vcalendarOrig.length); } - /* - vcalendar_element=vcalendar.match(vCalendar.pre['tzone']); - if(vcalendar_element!=null) - vcalendar=vcalendar.replace(vcalendar_element[0],''); - */ 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'); + /* matching for BEGIN:VEVENT */ vcalendarOrig = vcalendarOrig.replace(/\r*\n+/gm,'\r\n'); while(vcalendarOrig.match(vCalendar.pre['vevent'])!=null) { -- cgit