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

Merge branch "feat107-remove-select-all" into internal

This commit is contained in:
Anthony Lapenna 2016-08-04 11:31:35 +12:00
commit 548a458b9a
10 changed files with 7 additions and 43 deletions

View file

@ -2,7 +2,6 @@ angular.module('networks', [])
.controller('NetworksController', ['$scope', '$state', 'Network', 'Messages', 'errorMsgFilter',
function ($scope, $state, Network, Messages, errorMsgFilter) {
$scope.state = {};
$scope.state.toggle = false;
$scope.state.selectedItemCount = 0;
$scope.state.advancedSettings = false;
$scope.sortType = 'Scope';
@ -25,17 +24,6 @@ function ($scope, $state, Network, Messages, errorMsgFilter) {
$scope.sortType = sortType;
};
$scope.toggleSelectAll = function () {
angular.forEach($scope.state.filteredNetworks, function (i) {
i.Checked = $scope.state.toggle;
});
if ($scope.state.toggle) {
$scope.state.selectedItemCount = $scope.state.filteredNetworks.length;
} else {
$scope.state.selectedItemCount = 0;
}
};
$scope.selectItem = function (item) {
if (item.Checked) {
$scope.state.selectedItemCount++;