diff --git a/awx/ui/static/js/helpers/Parse.js b/awx/ui/static/js/helpers/Parse.js
index 0be6547c1d..a5cd1ecb39 100644
--- a/awx/ui/static/js/helpers/Parse.js
+++ b/awx/ui/static/js/helpers/Parse.js
@@ -21,47 +21,6 @@ angular.module('ParseHelper', ['Utilities', 'AngularCodeMirrorModule'])
codeMirror = AngularCodeMirror();
codeMirror.addModes($AnsibleConfig.variable_edit_modes);
- /*
- scope.blockParseTypeWatch = false;
- scope.blockVariableDataWatch = false;
-
- if (scope['remove' + fld + 'Watch']) {
- scope['remove' + fld + 'Watch']();
- }
- scope['remove' + fld + 'Watch'] = scope.$watch(pfld, function (newVal, oldVal) {
- var json_obj;
- if (newVal !== oldVal) {
- if (newVal === 'json') {
- if (scope[fld] && !/^---$/.test(scope[fld])) {
- // convert YAML to JSON
- try {
- json_obj = jsyaml.load(scope[fld]); //parse yaml into an obj
- scope[fld] = JSON.stringify(json_obj, null, " ");
- } catch (err) {
- // ignore parse errors. allow the user to paste values in and sync the
- // radio button later. parse errors will be flagged on save.
- }
- } else {
- scope[fld] = "{}";
- }
- } else {
- if (scope[fld] && !/^\{\}$/.test(scope[fld])) {
- // convert JSON to YAML
- try {
- json_obj = JSON.parse(scope[fld]);
- scope[fld] = jsyaml.safeDump(json_obj);
- } catch (err) {
- // ignore the errors. allow the user to paste values in and sync the
- // radio button later. parse errors will be flagged on save.
- }
- } else {
- scope[fld] = "---";
- }
- }
- }
- });
- */
-
scope.showCodeEditor = function() {
var title = 'Edit ' + scope[pfld].toUpperCase(),
container = document.getElementById('main-view');
diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less
index 8a5ee5e7cc..20d0f28574 100644
--- a/awx/ui/static/less/ansible-ui.less
+++ b/awx/ui/static/less/ansible-ui.less
@@ -395,6 +395,7 @@ dd {
}
.navbar>.container-fluid .navbar-brand {
+ height: 0;
margin-left: 0;
margin-top: 11px;
}
diff --git a/awx/ui/static/less/codemirror.less b/awx/ui/static/less/codemirror.less
index 5a8c18a8b4..9c01f50542 100644
--- a/awx/ui/static/less/codemirror.less
+++ b/awx/ui/static/less/codemirror.less
@@ -1,4 +1,3 @@
-
/*********************************************
* Copyright (c) 2014 AnsibleWorks, Inc.
*
@@ -24,5 +23,3 @@
z-index: 2060;
}
-
-
diff --git a/awx/ui/static/lib/angular-codemirror/.bower.json b/awx/ui/static/lib/angular-codemirror/.bower.json
index 07380f9619..f00a892537 100644
--- a/awx/ui/static/lib/angular-codemirror/.bower.json
+++ b/awx/ui/static/lib/angular-codemirror/.bower.json
@@ -1,6 +1,6 @@
{
"name": "angular-codemirror",
- "version": "1.0.1",
+ "version": "1.0.2",
"dependencies": {
"angular": "latest",
"angular-route": "latest",
@@ -13,11 +13,11 @@
"codemirror": "latest"
},
"homepage": "https://github.com/chouseknecht/angular-codemirror",
- "_release": "1.0.1",
+ "_release": "1.0.2",
"_resolution": {
"type": "version",
- "tag": "v1.0.1",
- "commit": "9a3d595de6b18faeb0834074f73bde476e4af9ec"
+ "tag": "v1.0.2",
+ "commit": "94b7aac548b036f4fbd94e56129ed9574e472616"
},
"_source": "git://github.com/chouseknecht/angular-codemirror.git",
"_target": "~1.0.0",
diff --git a/awx/ui/static/lib/angular-codemirror/lib/AngularCodeMirror.js b/awx/ui/static/lib/angular-codemirror/lib/AngularCodeMirror.js
index be0d812c7e..557eca31ee 100644
--- a/awx/ui/static/lib/angular-codemirror/lib/AngularCodeMirror.js
+++ b/awx/ui/static/lib/angular-codemirror/lib/AngularCodeMirror.js
@@ -72,13 +72,20 @@ angular.module('AngularCodeMirrorModule', [])
}
],
open: function() {
- // fix buttons- make them more twittery
- $('.ui-dialog[aria-describedby="af-code-editor-modal"]').find('.ui-dialog-titlebar button')
- .empty().attr({'class': 'close'}).text('x');
+ var self = $('.ui-dialog[aria-describedby="af-code-editor-modal"]'),
+ idx, options;
+
+ // bring the overlay up to just below the new window
+ idx = self.css('z-index');
+ $('.ui-widget-overlay').css({ 'z-index': idx - 1});
+
+ // fix buttons- make them more twittery
+ self.find('.ui-dialog-titlebar button').empty().attr({'class': 'close'}).text('x');
$('#af-code-edit-cancel').attr({ "class": "btn btn-default" }).empty().html(" Cancel");
$('#af-code-edit-ok').attr({ "class": "btn btn-primary" }).empty().html(" Save");
- var options = modes[mode];
+ // initialize CodeMirror
+ options = modes[mode];
options.value = scope[model];
myCodeMirror = CodeMirror(document.getElementById('af-code'), options);
}