Skip to content

Commit

Permalink
Fix administration YAML editor
Browse files Browse the repository at this point in the history
  • Loading branch information
eSlider committed Dec 20, 2016
1 parent d440a53 commit fdd81f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
37 changes: 1 addition & 36 deletions Resources/views/ElementAdmin/digitizer.html.twig
Original file line number Diff line number Diff line change
@@ -1,36 +1 @@
<div class="elementForm defaultForm elementFormDigitizer">

{% stylesheets filter="sass"
"bundles/mapbenderdigitizer/sass/element/manager-edit.scss" %}
<link rel="stylesheet" type="text/css" href="{{ asset_url }}"/>
{% endstylesheets %}

<script language="JavaScript">
$(function() {
var winHeight = $(window).height();
var popupContainer = $(".popupContainer.modal > .popup");
popupContainer.css({
'margin-top': 0,
'width': $(document).width(),
'height': winHeight - 10
});
var formHolder = $(".popupScroll > .popupSubContent", this);
var form = $("> .contentItem", formHolder);
var textarea = $("textarea", form);
textarea.css("height", formHolder.height() - (form.height() - textarea.height()));
CodeMirror.initTextAreaAsYaml(textarea[0]).setSize(textarea.width(), textarea.height());
// var yamlEditorElement = yy(( $("#elementForm > div > div.inputWrapper.code-yaml > div");
// yamlEditorElement.animate({
// height: $(window).height() - 285
// }, 20);
})
</script>
{{ form_label(form.title) }}{{ form_widget(form.title) }}
<div class="clearContainer"></div>
{{ form_label(form.configuration.target) }}{{ form_widget(form.configuration.target) }}
<div class="clearContainer"></div>
{{ form_label(form.configuration.schemes) }}{{ form_widget(form.configuration.schemes) }}
</div>
{% extends "MapbenderDigitizerBundle:ElementAdmin:digitizeradmin.html.twig" %}
3 changes: 2 additions & 1 deletion Resources/views/ElementAdmin/digitizeradmin.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@
$(textarea).val(value);
});
// Resize popup and elements
// Resize popup dand elements
var popupContainer = $(".popupContainer.modal > .popup");
var yamlEditorElement = $("#elementForm > div > div.inputWrapper.code-yaml > div");
debugger;
popupContainer.css('margin-top', 0);
popupContainer.animate({
Expand Down

0 comments on commit fdd81f5

Please sign in to comment.