1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00
focalboard/website/site/static/js/main.js
2021-01-07 14:12:26 -08:00

26 lines
865 B
JavaScript
Executable File

$(document).ready(function(){
$('.header__menu-toggle, .sidebar__menu-toggle').on('click', function(){
$(this).next().slideToggle();
})
$('.sub-menu__toggle').on('click', function(){
$(this).parent().next('.sub-menu').toggle();
$(this).toggleClass('fa-plus-square-o fa-minus-square-o');
});
let hideBannerExist = document.cookie.split(';').filter(item => { return item.indexOf('hideBanner=') >= 0}).length
if(hideBannerExist){
$(".notification-bar").addClass("closed");
$("header").removeClass("with-notification-bar");
}
$('.notification-bar__close').on('click', function(){
if(!hideBannerExist){
$(".notification-bar").addClass("closed");
$("header").removeClass("with-notification-bar");
}
document.cookie = 'hideBanner=true'
});
});