From f58dc55bbcf665e927b990878e523502cc666dd1 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 4 May 2016 21:24:20 +0200 Subject: [PATCH] prevent loading backlog without projectId --- app/coffee/modules/backlog/main.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/coffee/modules/backlog/main.coffee b/app/coffee/modules/backlog/main.coffee index b5a626b8..a9ceefeb 100644 --- a/app/coffee/modules/backlog/main.coffee +++ b/app/coffee/modules/backlog/main.coffee @@ -63,7 +63,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F bindMethods(@) @.page = 1 - @.disablePagination = false + @.disablePagination = true @scope.userstories = [] @scope.sectionName = @translate.instant("BACKLOG.SECTION_NAME") @@ -77,6 +77,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F # On Success promise.then => + @.disablePagination = false + title = @translate.instant("BACKLOG.PAGE_TITLE", {projectName: @scope.project.name}) description = @translate.instant("BACKLOG.PAGE_DESCRIPTION", { projectName: @scope.project.name, @@ -264,6 +266,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F @.page = page loadUserstories: (resetPagination = false, pageSize) -> + return null if !@scope.projectId + @.loadingUserstories = true @.disablePagination = true @scope.httpParams = @.getUrlFilters()