more new notifications fixes

This commit is contained in:
Mario Vavti 2017-10-09 13:35:58 +02:00
parent ec173e7eb2
commit 54a0690323
4 changed files with 26 additions and 30 deletions

View File

@ -445,10 +445,10 @@ function NavUpdate() {
updateCountsOnly = false; updateCountsOnly = false;
if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) { if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) {
$('#notifications-btn').css('opacity', 1); $('#notifications-btn, #notifications-btn-1').css('opacity', 1);
} }
else { else {
$('#notifications-btn').css('opacity', 0.5); $('#notifications-btn, #notifications-btn-1').css('opacity', 0.5);
$('#navbar-collapse-1').removeClass('show'); $('#navbar-collapse-1').removeClass('show');
} }

View File

@ -24,11 +24,6 @@ $(document).ready(function() {
}); });
} }
if(($(window).width() < 767) && ($('#left_aside_wrapper .widget, #left_aside_wrapper .vcard').length > 0))
$('#expand-aside').show();
else
$('#expand-aside').hide();
$('#expand-aside').on('click', toggleAside); $('#expand-aside').on('click', toggleAside);
$('section').on('click', function() { $('section').on('click', function() {
@ -64,8 +59,14 @@ $(document).ready(function() {
} }
}); });
var notifications_parent = $('#notifications')[0].parentElement.id;
$('#notifications-btn-1').click(function() { $('#notifications-btn-1').click(function() {
$('#region_3').toggleClass('fs'); if($('#notifications').hasClass('fs'))
$('#notifications').prependTo('#' + notifications_parent);
else
$('#notifications').prependTo('body');
$('#notifications').toggleClass('fs');
if($('#navbar-collapse-2').hasClass('show')){ if($('#navbar-collapse-2').hasClass('show')){
$('#navbar-collapse-2').removeClass('show'); $('#navbar-collapse-2').removeClass('show');
} }

View File

@ -53,6 +53,9 @@
</div> </div>
{{/if}} {{/if}}
</div> </div>
<div class="navbar-nav mr-auto">
<div class="text-white">{{$sel.active}}</div>
</div>
{{/if}} {{/if}}
<div class="navbar-toggler-right"> <div class="navbar-toggler-right">
{{if $nav.help.6}} {{if $nav.help.6}}
@ -60,7 +63,7 @@
<i class="fa fa-question-circle"></i> <i class="fa fa-question-circle"></i>
</button> </button>
{{/if}} {{/if}}
<button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1"> <button id="expand-aside" type="button" class="d-md-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
</button> </button>
{{if ! $experimental_notif}} {{if ! $experimental_notif}}
@ -212,9 +215,7 @@
{{/if}} {{/if}}
</ul> </ul>
{{else}} {{else}}
<div class="navbar-nav mr-auto"> <div class="navbar-text mr-auto d-none d-xl-flex"></div>
<div class="text-white">{{$sel.active}}</div>
</div>
{{/if}} {{/if}}
<div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div> <div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div>

View File

@ -16,33 +16,27 @@
} }
.fs { .fs {
position: fixed; top: 0px !important;
top: 0px;
left: 0px; left: 0px;
display: block !important; padding-top: 4.5rem !important;
background-color: white; background-color: white;
width: 100%; width: 100% !important;
max-width: 100%; max-width: 100%;
height: 100vh; height: 100vh;
z-index: 1020; z-index: 1030;
}
.fs #notifications {
position: relative;
width: 100%;
top: 0px;
} }
</style> </style>
<div id="nav-notifications-template" rel="template">
<a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
<img class="menu-img-3" data-src="{1}">
<span class="contactname">{2}</span>
<span class="dropdown-sub-text">{3}<br>{4}</span>
</a>
</div>
<div id="notifications" class="navbar-nav" data-children=".nav-item"> <div id="notifications" class="navbar-nav" data-children=".nav-item">
<div id="nav-notifications-template" rel="template">
<a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}">
<img class="menu-img-3" data-src="{1}">
<span class="contactname">{2}</span>
<span class="dropdown-sub-text">{3}<br>{4}</span>
</a>
</div>
{{foreach $notifications as $notification}} {{foreach $notifications as $notification}}
<div class="collapse {{$notification.type}}-button"> <div class="collapse {{$notification.type}}-button">
<a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu"> <a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu">