From 94b0a620596b0f0bdefccd5a747241986f635442 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 8 Jan 2015 09:37:29 -0500 Subject: [PATCH] Double click issue on radio button The custom inventory script radio button when choosing a custom script under Inventory->Group->Source had to be clicked 2x in order to select a desired radio button. Fixed this issue. Had to rename the list iterator to 'source_script' --- awx/ui/static/js/forms/Source.js | 2 +- awx/ui/static/js/helpers/CustomInventory.js | 6 +++--- awx/ui/static/js/lists/CustomInventory.js | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/js/forms/Source.js b/awx/ui/static/js/forms/Source.js index 5ecae9c43c..0ed2186e5e 100644 --- a/awx/ui/static/js/forms/Source.js +++ b/awx/ui/static/js/forms/Source.js @@ -112,7 +112,7 @@ angular.module('SourceFormDefinition', []) ngShow: "source && source.value === 'custom'", sourceModel: 'source_script', sourceField: 'name', - ngClick: 'lookUpCustom_inventory()', + ngClick: 'lookUpSource_script()' , //'lookUpCustom_inventory()', addRequired: true, editRequired: true }, diff --git a/awx/ui/static/js/helpers/CustomInventory.js b/awx/ui/static/js/helpers/CustomInventory.js index 7c1d564a35..e4928b616a 100644 --- a/awx/ui/static/js/helpers/CustomInventory.js +++ b/awx/ui/static/js/helpers/CustomInventory.js @@ -63,7 +63,7 @@ angular.module('CreateCustomInventoryHelper', [ 'Utilities', 'RestServices', 'Sc SearchInit({ scope: scope, - set: 'custom_inventories', + set: 'source_scripts' , // 'custom_inventories', list: list, url: defaultUrl }); @@ -219,7 +219,7 @@ function($compile, SchedulerInit, Rest, Wait, CustomInventoryList, CustomInvento SearchInit({ scope: scope, - set: 'custom_inventories', + set: 'source_scripts', //'custom_inventories', list: list, url: url }); @@ -324,7 +324,7 @@ function($compile, CustomInventoryList, Rest, Wait, GenerateList, CustomInventor SearchInit({ scope: scope, - set: 'custom_inventories', + set: 'source_scripts', //'custom_inventories', list: list, url: url }); diff --git a/awx/ui/static/js/lists/CustomInventory.js b/awx/ui/static/js/lists/CustomInventory.js index b37191399a..3765d53115 100644 --- a/awx/ui/static/js/lists/CustomInventory.js +++ b/awx/ui/static/js/lists/CustomInventory.js @@ -12,8 +12,8 @@ angular.module('CustomInventoryListDefinition', []) .value('CustomInventoryList', { - name: 'custom_inventories', - iterator: 'custom_inventory', + name: 'source_scripts' , // 'custom_inventories', + iterator: 'source_script', //'custom_inventory', selectTitle: 'Add custom inventory', editTitle: 'Custom Inventories', // selectInstructions: "

Select existing credentials by clicking each credential or checking the related checkbox. When " + @@ -37,7 +37,7 @@ angular.module('CustomInventoryListDefinition', []) }, organization: { label: 'Organization', - ngBind: 'custom_inventory.summary_fields.organization.name', + ngBind: 'source_script.summary_fields.organization.name', // linkTo: '/#/organizations/{{ custom_inventory.organization }}', sourceModel: 'organization', sourceField: 'name', @@ -56,7 +56,7 @@ angular.module('CustomInventoryListDefinition', []) fieldActions: { edit: { - ngClick: "editCustomInv(custom_inventory.id)", + ngClick: "editCustomInv(source_script.id)", icon: 'fa-edit', label: 'Edit', "class": 'btn-sm', @@ -65,7 +65,7 @@ angular.module('CustomInventoryListDefinition', []) }, "delete": { - ngClick: "deleteCustomInv(custom_inventory.id, custom_inventory.name)", + ngClick: "deleteCustomInv(source_script.id, source_script.name)", icon: 'fa-trash', label: 'Delete', "class": 'btn-sm',