1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

#372 feat(UX): Implement select all functionality (#437)

This commit is contained in:
Wouter Oet 2017-01-04 21:15:41 +01:00 committed by Anthony Lapenna
parent d8b800ddbc
commit 13943c3d8b
8 changed files with 48 additions and 4 deletions

View file

@ -47,6 +47,15 @@ function ($scope, $state, Network, Config, Messages, Settings) {
$scope.sortType = sortType;
};
$scope.selectItems = function(allSelected) {
angular.forEach($scope.state.filteredNetworks, function (network) {
if (network.Checked !== allSelected) {
network.Checked = allSelected;
$scope.selectItem(network);
}
});
};
$scope.selectItem = function (item) {
if (item.Checked) {
$scope.state.selectedItemCount++;