prevent pagination during the loadInitialData

stable
Juanfran 2016-05-04 21:51:01 +02:00
parent f58dc55bbc
commit abf48bd879
2 changed files with 5 additions and 4 deletions

View File

@ -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()

View File

@ -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