diff options
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)}}; } |