diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index c286b1d76c..041fef5500 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -103,12 +103,14 @@ function ProjectsAdd ($scope, $rootScope, $compile, $location, $log, $routeParam generator.reset(); LoadBreadCrumbs(); GetProjectPath({ scope: scope, master: master }); - + //console.log(scope.) + scope.scm_type = null; master.scm_type = null; scope.scm_type_options = [ - { label: 'GitHub', value: 'git' }, - { label: 'SVN', value: 'svn' }]; + { label: 'Git', value: 'git' }, + { label: 'SVN', value: 'svn' }, + { label: 'Mercurial', value: 'hg'}]; LookUpInit({ scope: scope, @@ -201,8 +203,9 @@ function ProjectsEdit ($scope, $rootScope, $compile, $location, $log, $routePara var relatedSets = {}; scope.scm_type_options = [ - { label: 'GitHub', value: 'git' }, - { label: 'SVN', value: 'svn' }]; + { label: 'Git', value: 'git' }, + { label: 'SVN', value: 'svn' }, + { label: 'Mercurial', value: 'hg'}]; scope.project_local_paths = []; scope.base_dir = ''; diff --git a/awx/ui/static/js/forms/Projects.js b/awx/ui/static/js/forms/Projects.js index c45aeef044..fb83885ae6 100644 --- a/awx/ui/static/js/forms/Projects.js +++ b/awx/ui/static/js/forms/Projects.js @@ -46,11 +46,21 @@ angular.module('ProjectFormDefinition', []) dataContainer: 'body', dataPlacement: 'right' }, + scm_type: { + label: 'SCM Type', + type: 'select', + ngOptions: 'type.label for type in scm_type_options', + ngChange: 'scmChange()', + defaultOption: 'Manual', + addRequired: false, + editRequired: false + }, base_dir: { label: 'Project Base Path', type: 'textarea', "class": 'col-lg-6', showonly: true, + ngShow: "scm_type == '' || scm_type == null", awPopOver: '
Base path used for locating playbooks. Directories found inside this path will be listed in the playbook directory drop-down. ' + 'Together the base path and selected playbook directory provide the full path used to locate playbooks.
' + 'Use PROJECTS_ROOT in your environment settings file to determine the base path value.
', @@ -58,15 +68,6 @@ angular.module('ProjectFormDefinition', []) dataContainer: 'body', dataPlacement: 'right' }, - scm_type: { - label: 'SCM Type', - type: 'select', - ngOptions: 'type.label for type in scm_type_options', - ngChange: 'scmChange()', - "default": '', - addRequired: false, - editRequired: false - }, local_path: { label: 'Playbook Directory', type: 'select', diff --git a/awx/ui/static/js/helpers/ProjectPath.js b/awx/ui/static/js/helpers/ProjectPath.js index fab4e15db7..5c44ea214b 100644 --- a/awx/ui/static/js/helpers/ProjectPath.js +++ b/awx/ui/static/js/helpers/ProjectPath.js @@ -31,6 +31,7 @@ angular.module('ProjectPathHelper', ['RestServices', 'Utilities']) scope.base_dir = data.project_base_dir; master.base_dir = scope.base_dir; // Keep in master object so that it doesn't get // wiped out on form reset. + console.log('base_dir: ' + scope.base_dir); if (opts.length == 0) { Alert('Missing Playbooks', 'There are no unassigned playbook directories in the base project path (' + scope.base_dir + '). ' + diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index ed8760549d..ecffc6d370 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -231,10 +231,10 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos }); $(document).bind('keydown', function(e) { if (e.keyCode === 27) { - $(element).popover('destroy'); - $('.popover').each(function(index) { + $(element).popover('hide'); + $('.popover').each(function(index) { // remove lingering popover