Fixed menu bar height. After TB upgrade it was fixed at 50px. Moved back to 0 and let image height be dominant. Pulled in angular-codemirror overlay fix.

This commit is contained in:
Chris Houseknecht 2014-02-17 15:04:17 -05:00
parent 0b0140e385
commit 84f79d4342
5 changed files with 16 additions and 52 deletions

View File

@ -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');

View File

@ -395,6 +395,7 @@ dd {
}
.navbar>.container-fluid .navbar-brand {
height: 0;
margin-left: 0;
margin-top: 11px;
}

View File

@ -1,4 +1,3 @@
/*********************************************
* Copyright (c) 2014 AnsibleWorks, Inc.
*
@ -24,5 +23,3 @@
z-index: 2060;
}

View File

@ -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",

View File

@ -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("<i class=\"fa fa-times\"></i> Cancel");
$('#af-code-edit-ok').attr({ "class": "btn btn-primary" }).empty().html("<i class=\"fa fa-check\"></i> Save");
var options = modes[mode];
// initialize CodeMirror
options = modes[mode];
options.value = scope[model];
myCodeMirror = CodeMirror(document.getElementById('af-code'), options);
}