diff --git a/frontend/app/scripts/controllers/case/CaseListCtrl.js b/frontend/app/scripts/controllers/case/CaseListCtrl.js index 800690b309..63c84c1b4b 100644 --- a/frontend/app/scripts/controllers/case/CaseListCtrl.js +++ b/frontend/app/scripts/controllers/case/CaseListCtrl.js @@ -65,7 +65,7 @@ this.list = new PaginatedQuerySrv({ root: undefined, objectType: 'case', - version: 'v0', + version: 'v1', scope: $scope, sort: self.filtering.context.sort, loadAll: false, diff --git a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js index 1c34016d7b..bbe0481344 100644 --- a/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js +++ b/frontend/app/scripts/services/common/data/PaginatedQuerySrv.js @@ -107,11 +107,14 @@ } } // TODO nadouani: handle the total differently - self.total = data.length; + //self.total = data.length; }); // get the total if not cached - if(this.filterHash !== $filter('md5')(JSON.stringify(this.filter))) { + var hash = $filter('md5')(JSON.stringify(this.filter)); + if(this.filterHash !== hash) { + this.filterHash = hash; + // Compute the total again QuerySrv.count('v1', this.operations, { filter: self.filter,