mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
fix of select2 reversion I made
This commit is contained in:
parent
eebbde78ce
commit
192e8cbab8
@ -237,8 +237,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
* TODO: Document
|
* TODO: Document
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
.factory('SourceChange', ['GetBasePath', 'CredentialList', 'LookUpInit', 'Empty', 'Wait', 'ParseTypeChange', 'CustomInventoryList' ,
|
.factory('SourceChange', ['GetBasePath', 'CredentialList', 'LookUpInit', 'Empty', 'Wait', 'ParseTypeChange', 'CustomInventoryList', 'CreateSelect2',
|
||||||
function (GetBasePath, CredentialList, LookUpInit, Empty, Wait, ParseTypeChange, CustomInventoryList) {
|
function (GetBasePath, CredentialList, LookUpInit, Empty, Wait, ParseTypeChange, CustomInventoryList, CreateSelect2) {
|
||||||
return function (params) {
|
return function (params) {
|
||||||
|
|
||||||
var scope = params.scope,
|
var scope = params.scope,
|
||||||
@ -256,37 +256,32 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
}
|
}
|
||||||
if (scope.source.value === 'rax') {
|
if (scope.source.value === 'rax') {
|
||||||
scope.source_region_choices = scope.rax_regions;
|
scope.source_region_choices = scope.rax_regions;
|
||||||
//$('#s2id_group_source_regions').select2('data', []);
|
|
||||||
$('#s2id_source_source_regions').select2('data', [{
|
|
||||||
id: 'all',
|
|
||||||
text: 'All'
|
|
||||||
}]);
|
|
||||||
$('#source_form').addClass('squeeze');
|
$('#source_form').addClass('squeeze');
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#source_source_regions'
|
||||||
|
});
|
||||||
} else if (scope.source.value === 'ec2') {
|
} else if (scope.source.value === 'ec2') {
|
||||||
scope.source_region_choices = scope.ec2_regions;
|
scope.source_region_choices = scope.ec2_regions;
|
||||||
$('#s2id_source_source_regions').select2('data', [{
|
|
||||||
id: 'all',
|
|
||||||
text: 'All'
|
|
||||||
}]);
|
|
||||||
scope.group_by_choices = scope.ec2_group_by;
|
scope.group_by_choices = scope.ec2_group_by;
|
||||||
$('#s2id_group_by').select2('data', []);
|
|
||||||
$('#source_form').addClass('squeeze');
|
$('#source_form').addClass('squeeze');
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#source_source_regions'
|
||||||
|
});
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#source_group_by'
|
||||||
|
});
|
||||||
} else if (scope.source.value === 'gce') {
|
} else if (scope.source.value === 'gce') {
|
||||||
scope.source_region_choices = scope.gce_regions;
|
scope.source_region_choices = scope.gce_regions;
|
||||||
//$('#s2id_group_source_regions').select2('data', []);
|
|
||||||
$('#s2id_source_source_regions').select2('data', [{
|
|
||||||
id: 'all',
|
|
||||||
text: 'All'
|
|
||||||
}]);
|
|
||||||
$('#source_form').addClass('squeeze');
|
$('#source_form').addClass('squeeze');
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#source_source_regions'
|
||||||
|
});
|
||||||
} else if (scope.source.value === 'azure') {
|
} else if (scope.source.value === 'azure') {
|
||||||
scope.source_region_choices = scope.azure_regions;
|
scope.source_region_choices = scope.azure_regions;
|
||||||
//$('#s2id_group_source_regions').select2('data', []);
|
|
||||||
$('#s2id_source_source_regions').select2('data', [{
|
|
||||||
id: 'all',
|
|
||||||
text: 'All'
|
|
||||||
}]);
|
|
||||||
$('#source_form').addClass('squeeze');
|
$('#source_form').addClass('squeeze');
|
||||||
|
CreateSelect2({
|
||||||
|
element: '#source_source_regions'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if(scope.source.value==="custom"){
|
if(scope.source.value==="custom"){
|
||||||
// need to filter the possible custom scripts by the organization defined for the current inventory
|
// need to filter the possible custom scripts by the organization defined for the current inventory
|
||||||
|
Loading…
Reference in New Issue
Block a user