Hide legislation text when the full-screen editor is not active
This commit is contained in:
@@ -22,9 +22,9 @@ App.MarkdownEditor =
|
||||
|
||||
$(this).find('.fullscreen-toggle').on 'click', ->
|
||||
$('.markdown-editor').toggleClass('fullscreen')
|
||||
$('.fullscreen-container').toggleClass('medium-8', 'medium-12')
|
||||
|
||||
if $('.markdown-editor').hasClass('fullscreen')
|
||||
$('.markdown-editor textarea').height($(window).height() - 100)
|
||||
else
|
||||
$('.markdown-editor textarea').height("10em")
|
||||
|
||||
|
||||
@@ -411,6 +411,11 @@ table.investment-projects-summary {
|
||||
|
||||
.markdown-editor {
|
||||
background-color: white;
|
||||
|
||||
.mardown-area,
|
||||
#markdown-preview {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-editor #markdown-preview {
|
||||
@@ -437,7 +442,9 @@ table.investment-projects-summary {
|
||||
|
||||
// 06. Legislation
|
||||
// --------------
|
||||
|
||||
.edit_legislation_draft_version .row {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.legislation-admin {
|
||||
.menu .active > a {
|
||||
background: none;
|
||||
@@ -595,6 +602,8 @@ table.investment-projects-summary {
|
||||
}
|
||||
|
||||
.fullscreen-container {
|
||||
text-align: center;
|
||||
background: #ccdbe6;
|
||||
|
||||
.markdown-editor-header,
|
||||
.markdown-editor-buttons {
|
||||
@@ -602,12 +611,7 @@ table.investment-projects-summary {
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@include breakpoint(medium) {
|
||||
float: right;
|
||||
}
|
||||
|
||||
line-height: 3rem;
|
||||
line-height: 8rem;
|
||||
|
||||
span {
|
||||
text-decoration: none;
|
||||
@@ -656,13 +660,28 @@ table.investment-projects-summary {
|
||||
|
||||
.fullscreen {
|
||||
|
||||
.mardown-area,
|
||||
#markdown-preview {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.column {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fullscreen-container {
|
||||
text-align: left;
|
||||
background: $admin-color;
|
||||
padding: 0.5rem 1rem;
|
||||
margin-bottom: 0;
|
||||
|
||||
a {
|
||||
line-height: 3rem;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-editor-header {
|
||||
vertical-align: top;
|
||||
|
||||
@@ -63,20 +63,19 @@
|
||||
<%= f.label :body %>
|
||||
<small><%= t('admin.legislation.draft_versions.form.use_markdown') %></small>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="markdown-editor">
|
||||
<div class="small-12 column fullscreen-container">
|
||||
<div class="markdown-editor-header truncate">Consul | Editando <span class="strong">Versión 3</span> del proceso <span class="strong">Licencias urbanísticas, declaraciones</span></div>
|
||||
<div class="small-12 medium-8 column fullscreen-container">
|
||||
<div class="markdown-editor-header truncate">Consul | Editando <span class="strong">Versión 3</span> del proceso <span class="strong">Licencias urbanísticas, declaraciones</span></div>
|
||||
|
||||
<div class="markdown-editor-buttons">
|
||||
<%= f.submit(class: "button", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
<div class="markdown-editor-buttons">
|
||||
<%= f.submit(class: "button", value: t("admin.legislation.draft_versions.#{admin_submit_action(@draft_version)}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
<%= link_to "#", class: 'fullscreen-toggle' do %>
|
||||
<span><%= t("admin.legislation.draft_versions.form.fullscreen_toggle")%></span> <span class="icon-expand"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="small-12 medium-6 column mardown-area">
|
||||
<%= f.text_area :body, label: false, placeholder: t('admin.legislation.draft_versions.form.body_placeholder') %>
|
||||
</div>
|
||||
<div id="markdown-preview" class="small-12 medium-6 column">
|
||||
|
||||
Reference in New Issue
Block a user