diff --git a/awx/ui/client/src/job-templates/add/job-templates-add.controller.js b/awx/ui/client/src/job-templates/add/job-templates-add.controller.js index 5f64274f0f..1e7d79d167 100644 --- a/awx/ui/client/src/job-templates/add/job-templates-add.controller.js +++ b/awx/ui/client/src/job-templates/add/job-templates-add.controller.js @@ -54,7 +54,10 @@ default_val: false }); CallbackHelpInit({ scope: $scope }); - ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback }); + SurveyControllerInit({ + scope: $scope, + parent_scope: $scope + }); } callback = function() { @@ -62,10 +65,6 @@ $scope[form.name + '_form'].$setDirty(); }; - SurveyControllerInit({ - scope: $scope, - parent_scope: $scope - }); var selectCount = 0; @@ -73,6 +72,7 @@ $scope.removeChoicesReady(); } $scope.removeChoicesReady = $scope.$on('choicesReadyVerbosity', function () { + ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback }); selectCount++; if (selectCount === 3) { var verbosity; @@ -120,8 +120,6 @@ element:'#job_template_verbosity', multiple: false }); - - $scope.$emit('lookUpInitialize'); } }); diff --git a/awx/ui/client/src/shared/Utilities.js b/awx/ui/client/src/shared/Utilities.js index f4517f47cf..5a4d0ce4dc 100644 --- a/awx/ui/client/src/shared/Utilities.js +++ b/awx/ui/client/src/shared/Utilities.js @@ -517,7 +517,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter']) function($rootScope) { return function(directive) { - /* @todo re-enable var docw, doch, spinnyw, spinnyh; if (directive === 'start' && !$rootScope.waiting) { $rootScope.waiting = true; @@ -538,7 +537,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter']) $rootScope.waiting = false; }); } - */ }; } ]) diff --git a/awx/ui/client/src/shared/stateDefinitions.factory.js b/awx/ui/client/src/shared/stateDefinitions.factory.js index b65ecfebf5..46e976036f 100644 --- a/awx/ui/client/src/shared/stateDefinitions.factory.js +++ b/awx/ui/client/src/shared/stateDefinitions.factory.js @@ -363,7 +363,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat function buildFieldDefinition(field) { let state = $stateExtender.buildDefinition({ searchPrefix: field.sourceModel, - squashSearchUrl: true, + //squashSearchUrl: true, @issue enable name: `${formStateDefinition.name}.${field.sourceModel}`, url: `/${field.sourceModel}`, // a lookup field's basePath takes precedence over generic list definition's basePath, if supplied @@ -391,6 +391,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat }, resolve: { ListDefinition: [field.list, function(list) { + list.iterator = field.sourceModel; return list; }], Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath', '$interpolate', '$rootScope', '$state',