1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +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

@ -64,7 +64,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="container in containers | filter:filter | orderBy:sortType:sortReverse">
<tr ng-repeat="container in (filteredContainers = ( containers | filter:filter | orderBy:sortType:sortReverse))">
<td><input type="checkbox" ng-model="container.Checked" /></td>
<td><a href="#/containers/{{ container.Id }}/">{{ container|containername}}</a></td>
<td><a href="#/images/{{ container.Image }}/">{{ container.Image }}</a></td>

View file

@ -6,7 +6,7 @@ angular.module('containers', [])
$scope.toggle = false;
$scope.displayAll = Settings.displayAll;
$scope.order = function(sortType) {
$scope.order = function (sortType) {
$scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false;
$scope.sortType = sortType;
};
@ -76,7 +76,7 @@ angular.module('containers', [])
};
$scope.toggleSelectAll = function () {
angular.forEach($scope.containers, function (i) {
angular.forEach($scope.filteredContainers, function (i) {
i.Checked = $scope.toggle;
});
};