Fixed navbar autohide after viewport resize

main
petergood 7 years ago
parent 0f699ece95
commit d71d19e23b

@ -3,18 +3,25 @@
/*globals ajaxify, config, utils, app, socket, NProgress*/ /*globals ajaxify, config, utils, app, socket, NProgress*/
$(document).ready(function() { $(document).ready(function() {
var env = utils.findBootstrapEnvironment(); $(".navbar-fixed-top").autoHidingNavbar({
showOnBottom: false,
disableAutohide: true
});
setupNProgress(); setupNProgress();
setupTaskbar(); setupTaskbar();
setupEditedByIcon(); setupEditedByIcon();
setupMobileMenu(); setupMobileMenu();
setupQuickReply(); setupQuickReply();
updateAutoHidingNavbar();
if (env === 'xs' || env ==='sm') { $(window).on('resize', function() {
$(".navbar-fixed-top").autoHidingNavbar({ updateAutoHidingNavbar();
showOnBottom: false });
});
function updateAutoHidingNavbar() {
var env = utils.findBootstrapEnvironment();
$(".navbar-fixed-top").autoHidingNavbar('setDisableAutohide', !(env === 'xs' || env ==='sm'));
} }
function setupNProgress() { function setupNProgress() {

Loading…
Cancel
Save