mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 06:29:31 -02:30
AC-378 fixed broken pop-over. Using 'esc' to close now workd correctly.
This commit is contained in:
@@ -103,12 +103,14 @@ function ProjectsAdd ($scope, $rootScope, $compile, $location, $log, $routeParam
|
|||||||
generator.reset();
|
generator.reset();
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
GetProjectPath({ scope: scope, master: master });
|
GetProjectPath({ scope: scope, master: master });
|
||||||
|
//console.log(scope.)
|
||||||
|
|
||||||
scope.scm_type = null;
|
scope.scm_type = null;
|
||||||
master.scm_type = null;
|
master.scm_type = null;
|
||||||
scope.scm_type_options = [
|
scope.scm_type_options = [
|
||||||
{ label: 'GitHub', value: 'git' },
|
{ label: 'Git', value: 'git' },
|
||||||
{ label: 'SVN', value: 'svn' }];
|
{ label: 'SVN', value: 'svn' },
|
||||||
|
{ label: 'Mercurial', value: 'hg'}];
|
||||||
|
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
@@ -201,8 +203,9 @@ function ProjectsEdit ($scope, $rootScope, $compile, $location, $log, $routePara
|
|||||||
var relatedSets = {};
|
var relatedSets = {};
|
||||||
|
|
||||||
scope.scm_type_options = [
|
scope.scm_type_options = [
|
||||||
{ label: 'GitHub', value: 'git' },
|
{ label: 'Git', value: 'git' },
|
||||||
{ label: 'SVN', value: 'svn' }];
|
{ label: 'SVN', value: 'svn' },
|
||||||
|
{ label: 'Mercurial', value: 'hg'}];
|
||||||
|
|
||||||
scope.project_local_paths = [];
|
scope.project_local_paths = [];
|
||||||
scope.base_dir = '';
|
scope.base_dir = '';
|
||||||
|
|||||||
@@ -46,11 +46,21 @@ angular.module('ProjectFormDefinition', [])
|
|||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
dataPlacement: 'right'
|
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: {
|
base_dir: {
|
||||||
label: 'Project Base Path',
|
label: 'Project Base Path',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
"class": 'col-lg-6',
|
"class": 'col-lg-6',
|
||||||
showonly: true,
|
showonly: true,
|
||||||
|
ngShow: "scm_type == '' || scm_type == null",
|
||||||
awPopOver: '<p>Base path used for locating playbooks. Directories found inside this path will be listed in the playbook directory drop-down. ' +
|
awPopOver: '<p>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.</p>' +
|
'Together the base path and selected playbook directory provide the full path used to locate playbooks.</p>' +
|
||||||
'<p>Use PROJECTS_ROOT in your environment settings file to determine the base path value.</p>',
|
'<p>Use PROJECTS_ROOT in your environment settings file to determine the base path value.</p>',
|
||||||
@@ -58,15 +68,6 @@ angular.module('ProjectFormDefinition', [])
|
|||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
dataPlacement: 'right'
|
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: {
|
local_path: {
|
||||||
label: 'Playbook Directory',
|
label: 'Playbook Directory',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ angular.module('ProjectPathHelper', ['RestServices', 'Utilities'])
|
|||||||
scope.base_dir = data.project_base_dir;
|
scope.base_dir = data.project_base_dir;
|
||||||
master.base_dir = scope.base_dir; // Keep in master object so that it doesn't get
|
master.base_dir = scope.base_dir; // Keep in master object so that it doesn't get
|
||||||
// wiped out on form reset.
|
// wiped out on form reset.
|
||||||
|
console.log('base_dir: ' + scope.base_dir);
|
||||||
if (opts.length == 0) {
|
if (opts.length == 0) {
|
||||||
Alert('Missing Playbooks',
|
Alert('Missing Playbooks',
|
||||||
'<p>There are no unassigned playbook directories in the base project path (' + scope.base_dir + '). ' +
|
'<p>There are no unassigned playbook directories in the base project path (' + scope.base_dir + '). ' +
|
||||||
|
|||||||
@@ -231,10 +231,10 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos
|
|||||||
});
|
});
|
||||||
$(document).bind('keydown', function(e) {
|
$(document).bind('keydown', function(e) {
|
||||||
if (e.keyCode === 27) {
|
if (e.keyCode === 27) {
|
||||||
$(element).popover('destroy');
|
$(element).popover('hide');
|
||||||
$('.popover').each(function(index) {
|
$('.popover').each(function(index) {
|
||||||
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
// remove lingering popover <div>. Seems to be a bug in TB3 RC1
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -490,8 +490,10 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
|||||||
html += (field.readonly) ? "readonly " : "";
|
html += (field.readonly) ? "readonly " : "";
|
||||||
html += (field.awRequiredWhen) ? "data-awrequired-init=\"" + field.awRequiredWhen.init + "\" aw-required-when=\"" +
|
html += (field.awRequiredWhen) ? "data-awrequired-init=\"" + field.awRequiredWhen.init + "\" aw-required-when=\"" +
|
||||||
field.awRequiredWhen.variable + "\" " : "";
|
field.awRequiredWhen.variable + "\" " : "";
|
||||||
html += ">\n";
|
html += ">\n";
|
||||||
html += "<option value=\"\">Choose " + field.label + "</option>\n";
|
html += "<option value=\"\">";
|
||||||
|
html += (field.defaultOption) ? field.defaultOption : "Choose " + field.label;
|
||||||
|
html += "</option>\n";
|
||||||
html += "</select>\n";
|
html += "</select>\n";
|
||||||
// Add error messages
|
// Add error messages
|
||||||
if ( (options.mode == 'add' && field.addRequired) || (options.mode == 'edit' && field.editRequired) ) {
|
if ( (options.mode == 'add' && field.addRequired) || (options.mode == 'edit' && field.editRequired) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user