diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-11 10:19:17 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-11 10:19:17 -0400 |
commit | 193d811cb3c9fd317b10e910b06d4e4533021cee (patch) | |
tree | cc5600b2f324053b8a1a541a755f17aa8685e31a /radicale_infcloud/web/forms.js | |
parent | WIP: add upload functionality, part 1 (diff) | |
download | radicaleinfcloud-193d811cb3c9fd317b10e910b06d4e4533021cee.tar.gz radicaleinfcloud-193d811cb3c9fd317b10e910b06d4e4533021cee.tar.bz2 radicaleinfcloud-193d811cb3c9fd317b10e910b06d4e4533021cee.zip |
WIP: uploaded event is visible but not clickable
The new event now populates in the visual calendar, but the user
cannot edit/view the details. The etag is not returned, which I think
is the last piece.
Diffstat (limited to 'radicale_infcloud/web/forms.js')
-rw-r--r-- | radicale_infcloud/web/forms.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/radicale_infcloud/web/forms.js b/radicale_infcloud/web/forms.js index 4e5a1a9..4fd8d6b 100644 --- a/radicale_infcloud/web/forms.js +++ b/radicale_infcloud/web/forms.js @@ -56,7 +56,19 @@ function dropHandler(event) { reader.onload = function(){ if(window.console){console.log(reader.result)}; //dataToVcalendar('EDIT' - uploadFile(reader.result) + var calEvent = uploadFile(reader.result); + // This lets it appear right away, but it is still not clickable. + console.log(`Using {newEvent.id} as uid`); + $('#uid').val(calEvent.id); + $('#etag').val(calEvent.etag); + refetchCalendarEvents(); + { + var beforeScroll = $('#main').width()-$('#calendar').width(); + $('#calendar').fullCalendar('unselect'); + $('#calendar').fullCalendar('removeEvents', 'fooUID'); + var afterScroll = $('#main').width()-$('#calendar').width(); + rerenderCalendar(beforeScroll!=afterScroll); + } }; reader.onerror = function(){if(window.console){console.log(reader.error)}}; } |