From 9bb696aa6e021fed39e0f22755030b5ff406fa19 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Fri, 20 Oct 2017 15:24:07 -0400 Subject: [PATCH] Fix for input directive using strict comparison to determined "checked" row --- .../lists/inventory/job-sub-inv-list.controller.js | 2 +- awx/ui/client/src/shared/lookup/lookup-modal.directive.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/job-submission/lists/inventory/job-sub-inv-list.controller.js b/awx/ui/client/src/job-submission/lists/inventory/job-sub-inv-list.controller.js index 002cb17e42..9a5bfdad9b 100644 --- a/awx/ui/client/src/job-submission/lists/inventory/job-sub-inv-list.controller.js +++ b/awx/ui/client/src/job-submission/lists/inventory/job-sub-inv-list.controller.js @@ -46,7 +46,7 @@ export default if (row.checked) { row.success_class = 'success'; } else { - row.checked = true; + row.checked = 1; row.success_class = ''; } $scope.$emit('inventorySelected', row); diff --git a/awx/ui/client/src/shared/lookup/lookup-modal.directive.js b/awx/ui/client/src/shared/lookup/lookup-modal.directive.js index a15d5b7d2b..6d263119f8 100644 --- a/awx/ui/client/src/shared/lookup/lookup-modal.directive.js +++ b/awx/ui/client/src/shared/lookup/lookup-modal.directive.js @@ -44,7 +44,7 @@ export default ['templateUrl', function(templateUrl) { if($scope.currentSelection && $scope.currentSelection.id) { $scope[list.name].forEach(function(row) { if (row.id === $scope.currentSelection.id) { - row.checked = true; + row.checked = 1; } }); } @@ -71,7 +71,7 @@ export default ['templateUrl', function(templateUrl) { if (row.checked) { row.success_class = 'success'; } else { - row.checked = true; + row.checked = 1; row.success_class = ''; } $scope.currentSelection = {