mirror of
https://github.com/sismics/docs.git
synced 2024-12-25 20:53:48 +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.offset = 0;
|
||||
$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.searchOpened = false;
|
||||
$scope.setSearch = function (search) { $scope.search = search };
|
||||
@ -57,7 +57,7 @@ angular.module('docs').controller('Document', function ($scope, $rootScope, $tim
|
||||
if (prev === next) {
|
||||
return;
|
||||
}
|
||||
$scope.offset = ($scope.currentPage - 1) * $scope.limit;
|
||||
$scope.offset = ($scope.currentPage - 1) * parseInt($scope.limit);
|
||||
$scope.pageDocuments();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user