|
|
|
@ -66,7 +66,7 @@ export class MainMenuToggleService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public initializeMenu():void { |
|
|
|
|
if (!this.mainMenu) return; |
|
|
|
|
if (!this.mainMenu) { return; } |
|
|
|
|
|
|
|
|
|
this.elementWidth = parseInt(window.OpenProject.guardedLocalStorage(this.localStorageKey) as string); |
|
|
|
|
|
|
|
|
@ -77,7 +77,7 @@ export class MainMenuToggleService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let currentProject:CurrentProjectService = this.injector.get(CurrentProjectService); |
|
|
|
|
if (jQuery(document.body).hasClass('controller-my') && this.elementWidth == 0 || currentProject.id === null) { |
|
|
|
|
if (jQuery(document.body).hasClass('controller-my') && this.elementWidth === 0 || currentProject.id === null) { |
|
|
|
|
this.saveWidth(this.defaultWidth); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -122,9 +122,8 @@ export class MainMenuToggleService { |
|
|
|
|
|
|
|
|
|
public closeWhenOnMobile():void { |
|
|
|
|
if (this.deviceService.isMobile) { |
|
|
|
|
this.closeMenu() |
|
|
|
|
this.closeMenu(); |
|
|
|
|
} |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private setToggleTitle():void { |
|
|
|
@ -144,7 +143,7 @@ export class MainMenuToggleService { |
|
|
|
|
// Leave a minimum amount of space for space fot the content
|
|
|
|
|
let maxMenuWidth = window.innerWidth - 520; |
|
|
|
|
|
|
|
|
|
if (width != undefined && width > maxMenuWidth) { |
|
|
|
|
if (width !== undefined && width > maxMenuWidth) { |
|
|
|
|
width = maxMenuWidth; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|