aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/data_process.js
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-08-12 09:50:37 -0400
committerB. Stack <bgstack15@gmail.com>2022-08-12 09:50:37 -0400
commitbd956a97f8f102f338d6c546398c52ccef1d3af0 (patch)
treece224293bb624f6cc2705898359654515c113ec1 /radicale_infcloud/web/data_process.js
parentfully fix the import-event function! (diff)
downloadradicaleinfcloud-bd956a97f8f102f338d6c546398c52ccef1d3af0.tar.gz
radicaleinfcloud-bd956a97f8f102f338d6c546398c52ccef1d3af0.tar.bz2
radicaleinfcloud-bd956a97f8f102f338d6c546398c52ccef1d3af0.zip
restore putVcalendarToCollection, hide dl button
And also improve code formatting and comments to match rest of project.
Diffstat (limited to 'radicale_infcloud/web/data_process.js')
-rw-r--r--radicale_infcloud/web/data_process.js17
1 files changed, 6 insertions, 11 deletions
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)
{
bgstack15