aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/cdav_calendar.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/cdav_calendar.tpl')
-rw-r--r--view/tpl/cdav_calendar.tpl22
1 files changed, 19 insertions, 3 deletions
diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl
index 252d45cff..c44a3faab 100644
--- a/view/tpl/cdav_calendar.tpl
+++ b/view/tpl/cdav_calendar.tpl
@@ -69,6 +69,14 @@ $(document).ready(function() {
allday = info.allDay;
+ if(allday) {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
+ }
+ else {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
+ }
+
+
var dtend = new Date(info.date.toUTCString());
if(allday) {
dtend.setDate(dtend.getDate() + 1);
@@ -114,6 +122,13 @@ $(document).ready(function() {
$('#l2s').remove();
}
+ if(event.allDay) {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
+ }
+ else {
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
+ }
+
if(event.publicId == new_event_id) {
$('#calendar_select').trigger('change');
$('#event_submit').show();
@@ -366,20 +381,21 @@ $(document).ready(function() {
}
if(default_view === 'dayGridMonth');
- $('#id_dtstart_wrapper, #id_dtend_wrapper').hide();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
});
function changeView(viewName) {
+
calendar.changeView(viewName);
$('#title').text(calendar.view.title);
$('#view_selector').html(views[calendar.view.type]);
if(viewName === 'dayGridMonth') {
- $('#id_dtstart_wrapper, #id_dtend_wrapper').hide();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').hide();
}
else {
- $('#id_dtstart_wrapper, #id_dtend_wrapper').show();
+ $('#id_dtstart_wrapper, #id_dtend_wrapper, #id_timezone_select_wrapper').show();
}
return;