prevent loading backlog without projectId

stable
Juanfran 2016-05-04 21:24:20 +02:00
parent 6e9f27a3dc
commit f58dc55bbc
1 changed files with 5 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
bindMethods(@) bindMethods(@)
@.page = 1 @.page = 1
@.disablePagination = false @.disablePagination = true
@scope.userstories = [] @scope.userstories = []
@scope.sectionName = @translate.instant("BACKLOG.SECTION_NAME") @scope.sectionName = @translate.instant("BACKLOG.SECTION_NAME")
@ -77,6 +77,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
# On Success # On Success
promise.then => promise.then =>
@.disablePagination = false
title = @translate.instant("BACKLOG.PAGE_TITLE", {projectName: @scope.project.name}) title = @translate.instant("BACKLOG.PAGE_TITLE", {projectName: @scope.project.name})
description = @translate.instant("BACKLOG.PAGE_DESCRIPTION", { description = @translate.instant("BACKLOG.PAGE_DESCRIPTION", {
projectName: @scope.project.name, projectName: @scope.project.name,
@ -264,6 +266,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
@.page = page @.page = page
loadUserstories: (resetPagination = false, pageSize) -> loadUserstories: (resetPagination = false, pageSize) ->
return null if !@scope.projectId
@.loadingUserstories = true @.loadingUserstories = true
@.disablePagination = true @.disablePagination = true
@scope.httpParams = @.getUrlFilters() @scope.httpParams = @.getUrlFilters()