1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 18:21:12 +03:00

Url parameter to Utilities.GetChoices to allow adding parameters to options query.

This commit is contained in:
Chris Houseknecht 2013-11-01 23:50:33 +00:00 committed by Chris Church
parent a5bb145f70
commit 41b5d8b9ad
2 changed files with 3 additions and 7 deletions

View File

@ -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;
}
}

View File

@ -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) {