aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/interface.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/interface.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/interface.js')
-rw-r--r--radicale_infcloud/web/interface.js34
1 files changed, 8 insertions, 26 deletions
diff --git a/radicale_infcloud/web/interface.js b/radicale_infcloud/web/interface.js
index 8ea4777..b7a4d4c 100644
--- a/radicale_infcloud/web/interface.js
+++ b/radicale_infcloud/web/interface.js
@@ -1308,32 +1308,14 @@ function uploadFile(fileContents)
inputUID = $('#event_calendar').val()+'';
else
return false;
- // ripped from data_process.js:1474
- var newUID=globalEventList.getNewUID();
- //process_elem=process_elem.replace('##:::##uid##:::##', newUID);
- fileContents = fileContents.replace(/^UID:.*$/gm,String("UID:"+newUID));
- // FINDTHIS: Could also try adding inputUID+newUID. Not sure if it helps or hurts.
- newEvent = stringToVevent(coll, fileContents, inputUID, $('#etag').val(), true);
- console.log(newEvent);
- // This was an attempt to populate the form. I found it easier to just send the object to the caldav server right away.
- // ref: interface.js:2601
- //showEventForm(null, newEvent.allDay, newEvent, null, 'show', '');
- // Just call the caldav operation directly.
- //putVcalendarToCollection(accountUID, inputUID, inputEtag, inputS, delUID, 'vevent', isFormHidden, deleteMode, fixedArr);
- // putVcalendarToCollection("http://domainjoin@d2-03a/radicale/domainjoin", "http://domainjoin@d2-03a/radicale/domainjoin/4f58b6a8-014f-03b9-ae12-071eb28798de/", "", fileContents, "", 'vevent', undefined, undefined,
- // WORKHERE: The new object does appear in the current view, but is not clickable! The user has to re-login to view/edit details.
- // Perhaps somehow add this to the globalEventList thing, like adding a brand-new event by hand?
- // Maybe follow the stack trace on the "save" button click.
- //refetchCalendarEvents();
- //rerenderCalendar(true);
- //dataToVcalendar('EDIT',origUID, inputUID, $('#etag').val(), '', isFormHidden, deleteMode);
- // 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;
+ // ripped from data_process.js:1474
+ var newUID=globalEventList.getNewUID();
+ fileContents = fileContents.replace(/^UID:.*$/gm,String("UID:"+newUID));
+ newEvent = stringToVevent(coll, fileContents, inputUID, $('#etag').val(), true);
+ //console.log(newEvent);
+ newEvent.vcalendar = newEvent.vcalendar.replace(/\r*\n+/gm,'\r\n');
+ putVcalendarToCollection(coll.accountUID, inputUID, "", fileContents, "", 'vevent', false, false, "");
+ return true;
}
/* STOP stackrpms */
bgstack15