fix issue #2788 - hide menu when the user is not inside a project

stable
Juanfran 2015-06-08 13:34:12 +02:00
parent c247c4746e
commit 38e0fcdb9e
2 changed files with 8 additions and 0 deletions

View File

@ -512,6 +512,8 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
if next.params.pslug
projectService.setProject(next.params.pslug)
else
projectService.cleanProject()
if next.title
$translate(next.title).then (text) => $appTitle.set(text)

View File

@ -28,6 +28,12 @@ class ProjectService
@.fetchProject()
cleanProject: () ->
@._pslug = null
@._project = null
@._section = null
@._sectionsBreadcrumb = Immutable.List()
fetchProject: () ->
return @projectsService.getProjectBySlug(@._pslug).then (project) =>
@._project = project