Minor improvements on project profile controller.
parent
645fb588f1
commit
d50508661c
|
@ -53,11 +53,14 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
promise = @.loadInitialData()
|
promise = @.loadInitialData()
|
||||||
|
|
||||||
promise.then () =>
|
promise.then =>
|
||||||
@appTitle.set("Project profile - " + @scope.sectionName + " - " + @scope.project.name)
|
@appTitle.set("Project profile - " + @scope.sectionName + " - " + @scope.project.name)
|
||||||
|
|
||||||
promise.then null, ->
|
promise.then null, (xhr) =>
|
||||||
console.log "FAIL" #TODO
|
if xhr and xhr.status == 404
|
||||||
|
@location.path("/not-found")
|
||||||
|
@location.replace()
|
||||||
|
return @q.reject(xhr)
|
||||||
|
|
||||||
loadProject: ->
|
loadProject: ->
|
||||||
return @rs.projects.get(@scope.projectId).then (project) =>
|
return @rs.projects.get(@scope.projectId).then (project) =>
|
||||||
|
@ -77,10 +80,6 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
@scope.projectId = data.project
|
@scope.projectId = data.project
|
||||||
return data
|
return data
|
||||||
|
|
||||||
promise.then null, =>
|
|
||||||
@location.path("/not-found")
|
|
||||||
@location.replace()
|
|
||||||
|
|
||||||
return promise.then(=> @.loadProject())
|
return promise.then(=> @.loadProject())
|
||||||
|
|
||||||
openDeleteLightbox: ->
|
openDeleteLightbox: ->
|
||||||
|
|
Loading…
Reference in New Issue