From b1dc0546fd0b45a12a4829005d3bff7cfb1ae545 Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Thu, 12 Jan 2017 17:32:29 -0800 Subject: [PATCH] fixing selection on the copy/move groups & hosts lists --- .../manage/copy-move/copy-move-groups.controller.js | 2 +- .../manage/copy-move/copy-move-hosts.controller.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.controller.js b/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.controller.js index 8c5549addb..9153dad34d 100644 --- a/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.controller.js +++ b/awx/ui/client/src/inventories/manage/copy-move/copy-move-groups.controller.js @@ -11,7 +11,7 @@ $scope.item = group; $scope.submitMode = $stateParams.groups === undefined ? 'move' : 'copy'; - $scope['toggle_'+ list.iterator] = function(id){ + $scope.toggle_row = function(id){ // toggle off anything else currently selected _.forEach($scope.groups, (item) => {return item.id === id ? item.checked = 1 : item.checked = null;}); // yoink the currently selected thing diff --git a/awx/ui/client/src/inventories/manage/copy-move/copy-move-hosts.controller.js b/awx/ui/client/src/inventories/manage/copy-move/copy-move-hosts.controller.js index a01387c173..5c95523036 100644 --- a/awx/ui/client/src/inventories/manage/copy-move/copy-move-hosts.controller.js +++ b/awx/ui/client/src/inventories/manage/copy-move/copy-move-hosts.controller.js @@ -8,10 +8,10 @@ ['$scope', '$state', '$stateParams', 'generateList', 'HostManageService', 'GetBasePath', 'CopyMoveGroupList', 'host', 'Dataset', function($scope, $state, $stateParams, GenerateList, HostManageService, GetBasePath, CopyMoveGroupList, host, Dataset){ var list = CopyMoveGroupList; - + $scope.item = host; $scope.submitMode = 'copy'; - $scope['toggle_'+ list.iterator] = function(id){ + $scope.toggle_row = function(id){ // toggle off anything else currently selected _.forEach($scope.groups, (item) => {return item.id === id ? item.checked = 1 : item.checked = null;}); // yoink the currently selected thing