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

. Seems to be a bug in TB3 RC1 - $(this).remove(); + $(this).remove(); }); } }); diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index 78df79a28d..79d26aa518 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -490,8 +490,10 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) html += (field.readonly) ? "readonly " : ""; html += (field.awRequiredWhen) ? "data-awrequired-init=\"" + field.awRequiredWhen.init + "\" aw-required-when=\"" + field.awRequiredWhen.variable + "\" " : ""; - html += ">\n"; - html += "\n"; + html += ">\n"; + html += "\n"; html += "\n"; // Add error messages if ( (options.mode == 'add' && field.addRequired) || (options.mode == 'edit' && field.editRequired) ) {