aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/tpl/cdav_calendar.tpl22
-rw-r--r--view/tpl/field_select_grouped.tpl2
2 files changed, 20 insertions, 4 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;
diff --git a/view/tpl/field_select_grouped.tpl b/view/tpl/field_select_grouped.tpl
index e6d1479de..ec067b8e7 100644
--- a/view/tpl/field_select_grouped.tpl
+++ b/view/tpl/field_select_grouped.tpl
@@ -1,4 +1,4 @@
- <div class='form-group field select'>
+ <div id='id_{{$field.0}}_wrapper' class='form-group field select'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<select class="form-control" name='{{$field.0}}' id='id_{{$field.0}}'>
{{foreach $field.4 as $group=>$opts}}