fix issue #2788 - hide menu when the user is not inside a project
parent
c247c4746e
commit
38e0fcdb9e
|
@ -512,6 +512,8 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
|
||||||
|
|
||||||
if next.params.pslug
|
if next.params.pslug
|
||||||
projectService.setProject(next.params.pslug)
|
projectService.setProject(next.params.pslug)
|
||||||
|
else
|
||||||
|
projectService.cleanProject()
|
||||||
|
|
||||||
if next.title
|
if next.title
|
||||||
$translate(next.title).then (text) => $appTitle.set(text)
|
$translate(next.title).then (text) => $appTitle.set(text)
|
||||||
|
|
|
@ -28,6 +28,12 @@ class ProjectService
|
||||||
|
|
||||||
@.fetchProject()
|
@.fetchProject()
|
||||||
|
|
||||||
|
cleanProject: () ->
|
||||||
|
@._pslug = null
|
||||||
|
@._project = null
|
||||||
|
@._section = null
|
||||||
|
@._sectionsBreadcrumb = Immutable.List()
|
||||||
|
|
||||||
fetchProject: () ->
|
fetchProject: () ->
|
||||||
return @projectsService.getProjectBySlug(@._pslug).then (project) =>
|
return @projectsService.getProjectBySlug(@._pslug).then (project) =>
|
||||||
@._project = project
|
@._project = project
|
||||||
|
|
Loading…
Reference in New Issue