aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/forms.js
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-08-11 10:19:17 -0400
committerB. Stack <bgstack15@gmail.com>2022-08-11 10:19:17 -0400
commit193d811cb3c9fd317b10e910b06d4e4533021cee (patch)
treecc5600b2f324053b8a1a541a755f17aa8685e31a /radicale_infcloud/web/forms.js
parentWIP: add upload functionality, part 1 (diff)
downloadradicaleinfcloud-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.js14
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)}};
}
bgstack15