1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

feat(ux): add the ability to change the number of paginated items on all entity tables (#537)

This commit is contained in:
Anthony Lapenna 2017-01-24 14:28:40 +13:00 committed by GitHub
parent 70933d1056
commit e2fc8af87a
26 changed files with 269 additions and 83 deletions

View file

@ -1,14 +1,14 @@
angular.module('endpoints', [])
.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'Settings', 'Messages',
function ($scope, $state, EndpointService, Settings, Messages) {
.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'Messages', 'Pagination',
function ($scope, $state, EndpointService, Messages, Pagination) {
$scope.state = {
error: '',
uploadInProgress: false,
selectedItemCount: 0
selectedItemCount: 0,
pagination_count: Pagination.getPaginationCount('endpoints')
};
$scope.sortType = 'Name';
$scope.sortReverse = true;
$scope.pagination_count = Settings.pagination_count;
$scope.formValues = {
Name: '',
@ -24,6 +24,10 @@ function ($scope, $state, EndpointService, Settings, Messages) {
$scope.sortType = sortType;
};
$scope.changePaginationCount = function() {
Pagination.setPaginationCount('endpoints', $scope.state.pagination_count);
};
$scope.selectItem = function (item) {
if (item.Checked) {
$scope.state.selectedItemCount++;