diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-07-08 21:12:54 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-07-08 21:12:54 +0200 |
commit | 02c08aed12071b41514236701de5fd6034d2dcba (patch) | |
tree | 91ba9269abee58b285341abb1ca8a0d0be618075 /view/tpl/cdav_calendar.tpl | |
parent | 87668f7fa8b22526918463bda7602d138385cc35 (diff) | |
download | volse-hubzilla-02c08aed12071b41514236701de5fd6034d2dcba.tar.gz volse-hubzilla-02c08aed12071b41514236701de5fd6034d2dcba.tar.bz2 volse-hubzilla-02c08aed12071b41514236701de5fd6034d2dcba.zip |
hide timezone select on allday events
Diffstat (limited to 'view/tpl/cdav_calendar.tpl')
-rw-r--r-- | view/tpl/cdav_calendar.tpl | 22 |
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; |