diff --git a/client/src/views/site/navbar.js b/client/src/views/site/navbar.js index 1e35ea0ba4..c6bdba16aa 100644 --- a/client/src/views/site/navbar.js +++ b/client/src/views/site/navbar.js @@ -99,6 +99,9 @@ class NavbarSiteView extends View { }; } + /** + * @private + */ handleGroupDropdownClick(e) { const $target = $(e.currentTarget).parent(); @@ -123,6 +126,9 @@ class NavbarSiteView extends View { this.handleGroupDropdownOpen($target); } + /** + * @private + */ handleGroupMenuPosition($menu, $target) { if (this.navbarAdjustmentHandler && this.navbarAdjustmentHandler.handleGroupMenuPosition()) { this.handleGroupMenuPosition($menu, $target); @@ -172,6 +178,9 @@ class NavbarSiteView extends View { this.handleGroupMenuScrolling($menu, $target, maxHeight); } + /** + * @private + */ handleGroupMenuScrolling($menu, $target, maxHeight) { $menu.css({ maxHeight: maxHeight + 'px', @@ -194,6 +203,9 @@ class NavbarSiteView extends View { }); } + /** + * @private + */ handleGroupDropdownOpen($target) { const $menu = $target.find('.dropdown-menu'); @@ -210,6 +222,9 @@ class NavbarSiteView extends View { }); } + /** + * @private + */ handleGroupDropdownInMoreOpen($target) { this.$el.find('.tab-group.tab.dropdown').removeClass('open'); @@ -240,10 +255,16 @@ class NavbarSiteView extends View { } } + /** + * @private + */ isCollapsableVisible() { return this.$el.find('.navbar-body').hasClass('in'); } + /** + * @private + */ toggleCollapsable() { if (this.isCollapsableVisible()) { this.hideCollapsable(); @@ -252,20 +273,33 @@ class NavbarSiteView extends View { } } + /** + * @private + */ hideCollapsable() { this.$el.find('.navbar-body').removeClass('in'); } + /** + * @private + */ showCollapsable() { this.$el.find('.navbar-body').addClass('in'); } + /** + * @private + */ xsCollapse() { this.hideCollapsable(); } + /** + * @private + * @return {boolean} + */ isMinimized() { - return this.$body.hasClass('minimized'); + return document.body.classList.contains('minimized'); } switchSideMenu() { @@ -281,13 +315,13 @@ class NavbarSiteView extends View { openSideMenu() { this.isSideMenuOpened = true; - this.$body.addClass('side-menu-opened'); + document.body.classList.add('side-menu-opened'); this.$sideMenuBackdrop = $('