nav and notification fixes

This commit is contained in:
2018-03-20 19:50:59 +01:00
parent 8486532c37
commit 1f3038ebbc
20 changed files with 349 additions and 89 deletions

View File

@@ -84,6 +84,7 @@ $(function() {
function open_navigation() {
window.timetable_can_scroll = false;
window.navigation_is_open = true;
$body.removeClass('notification_open');
$navigation.one(window.transitionend, function() {
window.requestAnimationFrame(function() {

View File

@@ -0,0 +1,13 @@
$(function() {
var $body = $('body');
$body.on('click', '.header__button--notification', function(event) {
event.preventDefault();
$body.toggleClass('notification_open');
});
$body.on('click', '.notification__close', function(event) {
event.preventDefault();
$body.removeClass('notification_open');
});
});

View File

@@ -19,6 +19,7 @@ $(function() {
if (!window.navigation_is_open) {
if (activated) {
if ($(window).scrollTop() < $(window).height() * 0.05 && window.timetable_can_scroll) {
$body.removeClass('notification_open');
window.prevent_scroll_calc = true;
$timetable.attr('data-active', 0);
$timetable.removeClass('active');
@@ -26,6 +27,7 @@ $(function() {
}
} else {
if ($(window).scrollTop() > $(window).height() * 0.05 && window.timetable_can_scroll) {
$body.removeClass('notification_open');
init_timetable_items();
}
}