From 5ca352a6c362ac1b452460ebbb07fbf56bb76417 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 17 Jun 2021 12:10:54 +0000 Subject: allow to add a wrapper class to the hq_controls widget --- view/tpl/hq_controls.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/hq_controls.tpl b/view/tpl/hq_controls.tpl index f46b7b298..87accb5e0 100644 --- a/view/tpl/hq_controls.tpl +++ b/view/tpl/hq_controls.tpl @@ -1,4 +1,4 @@ -
+
{{foreach $entries as $e}} {{/foreach}} diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index d3dbd7be9..6670faa60 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -61,7 +61,7 @@ $('#messages-widget').on('scroll', function() { if(this.scrollTop > this.scrollHeight - this.clientHeight - (this.scrollHeight/7)) { - get_messages_page('hq'); + get_messages_page(); } }); @@ -79,6 +79,7 @@ $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); function get_messages_page() { + if (get_messages_page_active) return; -- cgit v1.2.3 From 0e7473c3ba4e1da24ee4b7c9cc32645364e31a3d Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 18 Jun 2021 08:59:22 +0000 Subject: more css improvements --- view/tpl/hq_controls.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/hq_controls.tpl b/view/tpl/hq_controls.tpl index 333e21863..ce97a26a6 100644 --- a/view/tpl/hq_controls.tpl +++ b/view/tpl/hq_controls.tpl @@ -1,6 +1,6 @@
{{foreach $entries as $e}} - {{/foreach}} -- cgit v1.2.3 From 5b9dc764c5e6fbc8b0570265f6f5f84c9160ee6e Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 20 Jun 2021 08:25:29 +0000 Subject: make sure to not calculate timeago before the translations are loaded --- view/tpl/messages_widget.tpl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index 6670faa60..6f888962d 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -59,6 +59,11 @@ var get_messages_page_active = false; var messages_type; + $(document).ready(function () { + $('.messages-timeago').timeago(); + $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + }); + $('#messages-widget').on('scroll', function() { if(this.scrollTop > this.scrollHeight - this.clientHeight - (this.scrollHeight/7)) { get_messages_page(); @@ -75,9 +80,6 @@ get_messages_page(); }); - $('.messages-timeago').timeago(); - $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); - function get_messages_page() { if (get_messages_page_active) -- cgit v1.2.3 From 3632fb359f4dcf92c8a47cd36e6574490d4f1081 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 21 Jun 2021 07:52:47 +0000 Subject: calendar: emit a warning if the calendar for the created event is disabled --- view/tpl/cdav_calendar.tpl | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/cdav_calendar.tpl b/view/tpl/cdav_calendar.tpl index 28cd11b2e..823453843 100644 --- a/view/tpl/cdav_calendar.tpl +++ b/view/tpl/cdav_calendar.tpl @@ -24,16 +24,16 @@ $(document).ready(function() { calendar = new FullCalendar.Calendar(calendarEl, { plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ], eventSources: [ {{$sources}} ], - + timeZone: '{{$timezone}}', locale: '{{$lang}}', eventTextColor: 'white', header: false, - + height: 'auto', - + firstDay: {{$first_day}}, defaultView: default_view, @@ -59,7 +59,7 @@ $(document).ready(function() { allDayText: aStr['allday'], snapDuration: '00:05:00', - + dateClick: function(info) { if(new_event.id) { var event_poi = calendar.getEventById(new_event.id); @@ -151,7 +151,7 @@ $(document).ready(function() { event_poi.remove(); new_event = {}; } - + var calendar_id = ((event.extendedProps.calendar_id.constructor === Array) ? event.extendedProps.calendar_id[0] + ':' + event.extendedProps.calendar_id[1] : event.extendedProps.calendar_id); if(!event.extendedProps.recurrent) { @@ -209,7 +209,7 @@ $(document).ready(function() { $('#calendar_select').val(calendar_id).attr('disabled', true).trigger('change'); } }, - + eventResize: function(info) { var event = info.event._def; @@ -258,13 +258,13 @@ $(document).ready(function() { }); } }, - + eventDrop: function(info) { var event = info.event._def; var dtstart = new Date(info.event._instance.range.start); var dtend = new Date(info.event._instance.range.end); - + $('#id_title').val(event.title); $('#id_dtstart').val(dtstart.toUTCString().slice(0, -4)); $('#id_dtend').val(dtend.toUTCString().slice(0, -4)); @@ -316,24 +316,24 @@ $(document).ready(function() { $('#today-btn > i').show(); } } - + }); - + calendar.render(); $('#title').text(calendar.view.title); $('#view_selector').html(views[calendar.view.type]); - + $('#today-btn').on('click', function() { calendar.today(); $('#title').text(calendar.view.title); }); - + $('#prev-btn').on('click', function() { calendar.prev(); $('#title').text(calendar.view.title); }); - + $('#next-btn').on('click', function() { calendar.next(); $('#title').text(calendar.view.title); @@ -345,7 +345,7 @@ $(document).ready(function() { else $('#dbtn-acl, #id_categories_wrapper').addClass('d-none'); }); - + $('.color-edit').colorpicker({ input: '.color-edit-input' }); $(document).on('click','#fullscreen-btn', updateSize); @@ -481,9 +481,13 @@ function on_submit() { }) .done(function() { var eventSource = calendar.getEventSourceById('channel_calendar'); - eventSource.refetch(); + if (eventSource) { + eventSource.refetch(); + } + else { + $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 }); + } reset_form(); - }); } @@ -503,9 +507,13 @@ function on_submit() { .done(function() { var parts = $('#calendar_select').val().split(':'); var eventSource = calendar.getEventSourceById(parts[0]); - eventSource.refetch(); + if (eventSource) { + eventSource.refetch(); + } + else { + $.jGrowl('{{$disabled_warning}}', { sticky: false, theme: 'notice', life: 10000 }); + } reset_form(); - }); } } @@ -549,7 +557,7 @@ function reset_form() { event_poi.remove(); new_event = {}; } - + if($('#more_block').hasClass('open')) on_more(); } -- cgit v1.2.3 From 7da23603ecb002b862e8fcb0865e23a60188a788 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 21 Jun 2021 18:07:19 +0000 Subject: =?UTF-8?q?fi=C3=83lter=20children=20by=20tt-filter-active=20class?= =?UTF-8?q?=20instead=20of=20visibility=20selector=20to=20omit=20reload=20?= =?UTF-8?q?loop=20in=20mobile=20view=20where=20notifications=20ar=20not=20?= =?UTF-8?q?visible=20while=20off-canvas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/tpl/notifications_widget.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 54008b397..f7a429749 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -334,7 +334,7 @@ } // load more notifications if visible notifications count becomes low - if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':visible').length < 15) { + if(sse_type && sse_offset != -1 && $('#nav-' + sse_type + '-menu').children(':not(.tt-filter-active)').length < 15) { sse_bs_notifications(sse_type, false, true); } @@ -479,7 +479,7 @@ {{$no_notifications}}...
+ {{*
+ *}}
{{include file="field_select.tpl" field=$edit.album_select}}
-- cgit v1.2.3