mirror of https://github.com/portainer/portainer
feat(ui): remove the ability to select all entities from list views (#104)
parent
21344280a9
commit
111cd4ac64
|
@ -66,7 +66,7 @@
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label><input type="checkbox" ng-model="state.toggle" ng-change="toggleSelectAll()" /> Select</label></th>
|
<th></th>
|
||||||
<th>
|
<th>
|
||||||
<a ui-sref="images" ng-click="order('Id')">
|
<a ui-sref="images" ng-click="order('Id')">
|
||||||
Id
|
Id
|
||||||
|
|
|
@ -4,7 +4,6 @@ function ($scope, $state, Image, Messages) {
|
||||||
$scope.state = {};
|
$scope.state = {};
|
||||||
$scope.sortType = 'Created';
|
$scope.sortType = 'Created';
|
||||||
$scope.sortReverse = true;
|
$scope.sortReverse = true;
|
||||||
$scope.state.toggle = false;
|
|
||||||
$scope.state.selectedItemCount = 0;
|
$scope.state.selectedItemCount = 0;
|
||||||
|
|
||||||
$scope.config = {
|
$scope.config = {
|
||||||
|
@ -17,17 +16,6 @@ function ($scope, $state, Image, Messages) {
|
||||||
$scope.sortType = sortType;
|
$scope.sortType = sortType;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggleSelectAll = function () {
|
|
||||||
angular.forEach($scope.state.filteredImages, function (i) {
|
|
||||||
i.Checked = $scope.state.toggle;
|
|
||||||
});
|
|
||||||
if ($scope.state.toggle) {
|
|
||||||
$scope.state.selectedItemCount = $scope.state.filteredImages.length;
|
|
||||||
} else {
|
|
||||||
$scope.state.selectedItemCount = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.selectItem = function (item) {
|
$scope.selectItem = function (item) {
|
||||||
if (item.Checked) {
|
if (item.Checked) {
|
||||||
$scope.state.selectedItemCount++;
|
$scope.state.selectedItemCount++;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label><input type="checkbox" ng-model="state.toggle" ng-change="toggleSelectAll()"/> Select</label></th>
|
<th></th>
|
||||||
<th>
|
<th>
|
||||||
<a ui-sref="networks" ng-click="order('Name')">
|
<a ui-sref="networks" ng-click="order('Name')">
|
||||||
Name
|
Name
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
angular.module('networks', [])
|
angular.module('networks', [])
|
||||||
.controller('NetworksController', ['$scope', 'Network', 'Messages', 'errorMsgFilter',
|
.controller('NetworksController', ['$scope', 'Network', 'Messages', 'errorMsgFilter',
|
||||||
function ($scope, Network, Messages, errorMsgFilter) {
|
function ($scope, Network, Messages, errorMsgFilter) {
|
||||||
|
|
||||||
$scope.state = {};
|
$scope.state = {};
|
||||||
$scope.state.toggle = false;
|
|
||||||
$scope.state.selectedItemCount = 0;
|
$scope.state.selectedItemCount = 0;
|
||||||
$scope.sortType = 'Name';
|
$scope.sortType = 'Name';
|
||||||
$scope.sortReverse = true;
|
$scope.sortReverse = true;
|
||||||
|
@ -13,17 +11,6 @@ function ($scope, Network, Messages, errorMsgFilter) {
|
||||||
$scope.sortType = sortType;
|
$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) {
|
$scope.selectItem = function (item) {
|
||||||
if (item.Checked) {
|
if (item.Checked) {
|
||||||
$scope.state.selectedItemCount++;
|
$scope.state.selectedItemCount++;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label><input type="checkbox" ng-model="state.toggle" ng-change="toggleSelectAll()"/> Select</label></th>
|
<th></th>
|
||||||
<th>
|
<th>
|
||||||
<a ui-sref="volumes" ng-click="order('Name')">
|
<a ui-sref="volumes" ng-click="order('Name')">
|
||||||
Name
|
Name
|
||||||
|
|
|
@ -2,7 +2,6 @@ angular.module('volumes', [])
|
||||||
.controller('VolumesController', ['$scope', 'Volume', 'Messages', 'errorMsgFilter',
|
.controller('VolumesController', ['$scope', 'Volume', 'Messages', 'errorMsgFilter',
|
||||||
function ($scope, Volume, Messages, errorMsgFilter) {
|
function ($scope, Volume, Messages, errorMsgFilter) {
|
||||||
$scope.state = {};
|
$scope.state = {};
|
||||||
$scope.state.toggle = false;
|
|
||||||
$scope.state.selectedItemCount = 0;
|
$scope.state.selectedItemCount = 0;
|
||||||
$scope.sortType = 'Name';
|
$scope.sortType = 'Name';
|
||||||
$scope.sortReverse = true;
|
$scope.sortReverse = true;
|
||||||
|
@ -12,17 +11,6 @@ function ($scope, Volume, Messages, errorMsgFilter) {
|
||||||
$scope.sortType = sortType;
|
$scope.sortType = sortType;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggleSelectAll = function () {
|
|
||||||
angular.forEach($scope.state.filteredVolumes, function (i) {
|
|
||||||
i.Checked = $scope.state.toggle;
|
|
||||||
});
|
|
||||||
if ($scope.state.toggle) {
|
|
||||||
$scope.state.selectedItemCount = $scope.state.filteredVolumes.length;
|
|
||||||
} else {
|
|
||||||
$scope.state.selectedItemCount = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.selectItem = function (item) {
|
$scope.selectItem = function (item) {
|
||||||
if (item.Checked) {
|
if (item.Checked) {
|
||||||
$scope.state.selectedItemCount++;
|
$scope.state.selectedItemCount++;
|
||||||
|
|
Loading…
Reference in New Issue