1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

crosbymichael/dockerui#194 fix toggleAll function by only iterating over filtered objects

Signed-off-by: Philip Miglinci <p.miglinci@gmail.com>
This commit is contained in:
Philip Miglinci 2016-03-25 15:29:39 +01:00
parent 8cdb675abc
commit d2bc18b575
8 changed files with 9 additions and 9 deletions

View file

@ -72,7 +72,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="network in networks | filter:filter | orderBy:sortType:sortReverse">
<tr ng-repeat="network in ( filteredNetworks = (networks | filter:filter | orderBy:sortType:sortReverse))">
<td><input type="checkbox" ng-model="network.Checked"/></td>
<td><a href="#/networks/{{ network.Id }}/">{{ network.Name|truncate:20}}</a></td>
<td>{{ network.Id }}</td>

View file

@ -52,7 +52,7 @@ angular.module('networks', []).config(['$routeProvider', function ($routeProvide
};
$scope.toggleSelectAll = function () {
angular.forEach($scope.networks, function (i) {
angular.forEach($scope.filteredNetworks, function (i) {
i.Checked = $scope.toggle;
});
};