From abf48bd879f4dfae3c52c261d050e1e18b4a72ad Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 4 May 2016 21:51:01 +0200 Subject: [PATCH] prevent pagination during the loadInitialData --- app/coffee/modules/backlog/main.coffee | 7 ++++--- app/partials/includes/modules/backlog-table.jade | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/backlog/main.coffee b/app/coffee/modules/backlog/main.coffee index a9ceefeb..987cffd1 100644 --- a/app/coffee/modules/backlog/main.coffee +++ b/app/coffee/modules/backlog/main.coffee @@ -63,7 +63,8 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F bindMethods(@) @.page = 1 - @.disablePagination = true + @.disablePagination = false + @.firstLoadComplete = false @scope.userstories = [] @scope.sectionName = @translate.instant("BACKLOG.SECTION_NAME") @@ -77,7 +78,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F # On Success promise.then => - @.disablePagination = false + @.firstLoadComplete = true title = @translate.instant("BACKLOG.PAGE_TITLE", {projectName: @scope.project.name}) description = @translate.instant("BACKLOG.PAGE_DESCRIPTION", { @@ -267,7 +268,7 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F loadUserstories: (resetPagination = false, pageSize) -> return null if !@scope.projectId - + @.loadingUserstories = true @.disablePagination = true @scope.httpParams = @.getUrlFilters() diff --git a/app/partials/includes/modules/backlog-table.jade b/app/partials/includes/modules/backlog-table.jade index 63c7268c..8ee5707b 100644 --- a/app/partials/includes/modules/backlog-table.jade +++ b/app/partials/includes/modules/backlog-table.jade @@ -12,7 +12,7 @@ div.backlog-table-body( tg-backlog-sortable, ng-class="{'show-tags': ctrl.showTags, 'active-filters': ctrl.activeFilters}" infinite-scroll="ctrl.loadUserstories()" - infinite-scroll-disabled="ctrl.disablePagination" + infinite-scroll-disabled="ctrl.disablePagination || !ctrl.firstLoadComplete" infinite-scroll-immediate-check='false' ) include ../components/backlog-row