mirror of
https://github.com/ansible/awx.git
synced 2026-03-16 00:17:29 -02:30
AC-564 fixed a bug with CodeMirror editor and post dialog removal/cleanup.
This commit is contained in:
@@ -238,7 +238,7 @@ function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $routePar
|
|||||||
|
|
||||||
generator.reset();
|
generator.reset();
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
|
|
||||||
$scope.inventoryParseType = 'yaml';
|
$scope.inventoryParseType = 'yaml';
|
||||||
ParseTypeChange({ scope: $scope, variable: 'inventory_variables', parse_variable: 'inventoryParseType',
|
ParseTypeChange({ scope: $scope, variable: 'inventory_variables', parse_variable: 'inventoryParseType',
|
||||||
field_id: 'inventory_inventory_variables' });
|
field_id: 'inventory_inventory_variables' });
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
|
|||||||
//hide the textarea and show a fresh CodeMirror with the current mode (json or yaml)
|
//hide the textarea and show a fresh CodeMirror with the current mode (json or yaml)
|
||||||
codeMirror = AngularCodeMirror();
|
codeMirror = AngularCodeMirror();
|
||||||
codeMirror.addModes($AnsibleConfig.variable_edit_modes);
|
codeMirror.addModes($AnsibleConfig.variable_edit_modes);
|
||||||
|
console.log('here');
|
||||||
codeMirror.showTextArea({ scope: scope, model: fld, element: field_id, mode: scope[pfld], onReady: onReady, onChange: onChange });
|
codeMirror.showTextArea({ scope: scope, model: fld, element: field_id, mode: scope[pfld], onReady: onReady, onChange: onChange });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
|||||||
.factory('ClearScope', [
|
.factory('ClearScope', [
|
||||||
function () {
|
function () {
|
||||||
return function () {
|
return function () {
|
||||||
|
|
||||||
|
$('#form-modal .modal-body').empty();
|
||||||
|
$('#form-modal2 .modal-body').empty();
|
||||||
|
|
||||||
$('.tooltip').each(function () {
|
$('.tooltip').each(function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user