mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 07:07:57 +01:00
Closes #173: fix pagination default page size
This commit is contained in:
parent
66d331ddb8
commit
6d865af15a
@ -11,7 +11,7 @@ angular.module('docs').controller('Document', function ($scope, $rootScope, $tim
|
|||||||
$scope.asc = false;
|
$scope.asc = false;
|
||||||
$scope.offset = 0;
|
$scope.offset = 0;
|
||||||
$scope.currentPage = 1;
|
$scope.currentPage = 1;
|
||||||
$scope.limit = _.isUndefined(localStorage.documentsPageSize) ? 10 : localStorage.documentsPageSize;
|
$scope.limit = _.isUndefined(localStorage.documentsPageSize) ? '10' : localStorage.documentsPageSize;
|
||||||
$scope.search = $state.params.search ? $state.params.search : '';
|
$scope.search = $state.params.search ? $state.params.search : '';
|
||||||
$scope.searchOpened = false;
|
$scope.searchOpened = false;
|
||||||
$scope.setSearch = function (search) { $scope.search = search };
|
$scope.setSearch = function (search) { $scope.search = search };
|
||||||
@ -57,7 +57,7 @@ angular.module('docs').controller('Document', function ($scope, $rootScope, $tim
|
|||||||
if (prev === next) {
|
if (prev === next) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.offset = ($scope.currentPage - 1) * $scope.limit;
|
$scope.offset = ($scope.currentPage - 1) * parseInt($scope.limit);
|
||||||
$scope.pageDocuments();
|
$scope.pageDocuments();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user