Merge branch 'legislation-module-stable' into 66-sync-scroll-in-markdown-editor

This commit is contained in:
Fernando Blat
2017-01-23 15:08:25 +01:00
19 changed files with 185 additions and 29 deletions

View File

@@ -4,7 +4,7 @@ App.Legislation =
$('#js-toggle-debate').on
click: ->
$('#debate-show').toggle()
$('#js-toggle-small-debate').on
click: ->
$('#debate-show').toggle()

View File

@@ -25,9 +25,15 @@ App.MarkdownEditor =
$(this).find('.fullscreen-toggle').on 'click', ->
$('.markdown-editor').toggleClass('fullscreen')
$('.fullscreen-container').toggleClass('medium-8', 'medium-12')
span = $(this).find('span')
current_html = span.html()
if(current_html == span.data('open-text'))
span.html(span.data('closed-text'))
else
span.html(span.data('open-text'))
if $('.markdown-editor').hasClass('fullscreen')
$('.markdown-editor textarea').height($(window).height() - 100)
else
$('.markdown-editor textarea').height("10em")

View File

@@ -411,6 +411,11 @@ table.investment-projects-summary {
.markdown-editor {
background-color: white;
.markdown-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;
@@ -660,13 +664,28 @@ table.investment-projects-summary {
.fullscreen {
.markdown-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;

View File

@@ -212,10 +212,18 @@ $epigraph-line-height: rem-calc(22);
cursor: pointer;
display: inline-block;
margin: 0 1rem 1rem 0;
transition: all 0.4s;
border-bottom: 2px solid transparent;
&:first-of-type {
margin-left: 0;
}
&:hover,
&:active,
&:focus {
border-bottom: 2px solid $brand;
}
@media (min-width: 950px) {
margin: 0 0 0 3rem;
@@ -223,6 +231,7 @@ $epigraph-line-height: rem-calc(22);
a,
h4 {
display: block;
color: #6D6D6D;
margin-bottom: 0;
}