aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/notifications_widget.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/notifications_widget.tpl')
-rw-r--r--view/tpl/notifications_widget.tpl75
1 files changed, 38 insertions, 37 deletions
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 76b0851a7..fcadf71e5 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -257,7 +257,7 @@
if(typeof sse_type === 'undefined')
return;
- if(followup || !manual || !($('#nav-' + sse_type + '-sub').hasClass('collapse') && $('#nav-' + sse_type + '-sub').hasClass('show'))) {
+ if(followup || !manual || !$('#notification-link-' + sse_type).hasClass('collapsed')) {
if(sse_offset >= 0) {
$("#nav-" + sse_type + "-loading").show();
@@ -287,9 +287,9 @@
sse_handleNotifications(obj, replace, followup);
});
}
- else
+ else {
$("#nav-" + sse_type + "-loading").hide();
-
+ }
}
else {
sessionStorage.removeItem('notification_open');
@@ -315,6 +315,7 @@
}
else {
$('.' + type + '-update').html('0');
+ $('#nav-' + type + '-sub').removeClass('show');
$('.' + type + '-button').fadeOut(function() {
sse_setNotificationsStatus();
});
@@ -490,9 +491,10 @@
var fcount = Number($('.' + n[1] + '-update').html());
fcount--;
$('.' + n[1] + '-update').html(fcount);
- if(fcount < 1)
+ if(fcount < 1) {
$('.' + n[1] + '-button').fadeOut();
-
+ $('#nav-' + n[1] + '-sub').removeClass('show');
+ }
var count = Number($(this).find('.bg-secondary').html());
count--;
$(this).find('.bg-secondary').html(count);
@@ -538,43 +540,42 @@
<i class="fa fa-{11} text-muted"></i>
</a>
</div>
- <div id="notifications" class="border border-bottom-0 rounded navbar-nav collapse">
+ <div id="notifications" class="border border-top-0 rounded navbar-nav collapse">
{{foreach $notifications as $notification}}
- <div class="rounded list-group list-group-flush collapse {{$notification.type}}-button">
+ <div class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse {{$notification.type}}-button">
<a id="notification-link-{{$notification.type}}" class="collapsed list-group-item fakelink notification-link" href="#" title="{{$notification.title}}" data-bs-target="#nav-{{$notification.type}}-sub" data-bs-toggle="collapse" data-sse_type="{{$notification.type}}">
<i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}}
<span class="float-end badge bg-{{$notification.severity}} {{$notification.type}}-update"></span>
</a>
- <div id="nav-{{$notification.type}}-sub" class="list-group list-group-flush border-bottom collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}">
- {{if $notification.viewall}}
- <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}">
- <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}}
- </a>
- {{/if}}
- {{if $notification.markall}}
- <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;">
- <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}}
- </div>
- {{/if}}
- {{if $notification.filter}}
- {{if $notification.filter.posts_label}}
- <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only">
- <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}}
- </div>
- {{/if}}
- {{if $notification.filter.name_label}}
- <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only">
- <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div>
- <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}">
- <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div>
- </div>
- {{/if}}
- {{/if}}
- <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div>
- <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;">
- {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
- </div>
-
+ </div>
+ <div id="nav-{{$notification.type}}-sub" class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}">
+ {{if $notification.viewall}}
+ <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}">
+ <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}}
+ </a>
+ {{/if}}
+ {{if $notification.markall}}
+ <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;">
+ <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}}
+ </div>
+ {{/if}}
+ {{if $notification.filter}}
+ {{if $notification.filter.posts_label}}
+ <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only">
+ <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}}
+ </div>
+ {{/if}}
+ {{if $notification.filter.name_label}}
+ <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only">
+ <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div>
+ <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}">
+ <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div>
+ </div>
+ {{/if}}
+ {{/if}}
+ <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div>
+ <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;">
+ {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span>
</div>
</div>
{{/foreach}}