From 8a827950d872882089129e9df8bcfbacf4f6db57 Mon Sep 17 00:00:00 2001 From: Damian Date: Sun, 12 Mar 2017 17:39:27 +0100 Subject: [PATCH] Ability to select all endpoints via a checkbox (#607) --- app/components/endpoints/endpoints.html | 4 +++- app/components/endpoints/endpointsController.js | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/components/endpoints/endpoints.html b/app/components/endpoints/endpoints.html index d9cb053ae..cbce6c15a 100644 --- a/app/components/endpoints/endpoints.html +++ b/app/components/endpoints/endpoints.html @@ -137,7 +137,9 @@ - +
+ + Name diff --git a/app/components/endpoints/endpointsController.js b/app/components/endpoints/endpointsController.js index 5fb787ccc..ba50144d4 100644 --- a/app/components/endpoints/endpointsController.js +++ b/app/components/endpoints/endpointsController.js @@ -28,6 +28,15 @@ function ($scope, $state, EndpointService, EndpointProvider, Messages, Paginatio Pagination.setPaginationCount('endpoints', $scope.state.pagination_count); }; + $scope.selectItems = function (allSelected) { + angular.forEach($scope.state.filteredEndpoints, function (endpoint) { + if (endpoint.Checked !== allSelected) { + endpoint.Checked = allSelected; + $scope.selectItem(endpoint); + } + }); + }; + $scope.selectItem = function (item) { if (item.Checked) { $scope.state.selectedItemCount++;