From 41b5d8b9adb5059974536ad2c0b5b704d0763b53 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Fri, 1 Nov 2013 23:50:33 +0000 Subject: [PATCH] Url parameter to Utilities.GetChoices to allow adding parameters to options query. --- awx/ui/static/js/controllers/Projects.js | 6 ------ awx/ui/static/js/helpers/Groups.js | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 36fa64d5b7..3e4b3fcabe 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -249,19 +249,13 @@ function ProjectsAdd ($scope, $rootScope, $compile, $location, $log, $routeParam LoadBreadCrumbs(); GetProjectPath({ scope: scope, master: master }); - //scope.scm_type = null; - //master.scm_type = null; - if (scope.removeChoicesReady) { scope.removeChoicesReady(); } scope.removeChoicesReady = scope.$on('choicesReady', function() { - console.log('setting type'); - var found = false; for (var i=0; i < scope.scm_type_options.length; i++) { if (scope.scm_type_options[i].value == '') { scope['scm_type'] = scope.scm_type_options[i]; - found = true; break; } } diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index fd8c7b98fd..25fd8beb1f 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -25,7 +25,9 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' .success( function(data, status, headers, config) { var choices = data.actions.GET.source.choices for (var i=0; i < choices.length; i++) { - scope[variable].push({ label: [ (choices[i][0] == "") ? 'Manual' : choices[i][1] ], value: choices[i][0] }); + if (choices[i][0] !== 'file') { + scope[variable].push({ label: [ (choices[i][0] == "") ? 'Manual' : choices[i][1] ], value: choices[i][0] }); + } } }) .error( function(data, status, headers, config) {