Fixes icon animation on reply comments

This commit is contained in:
Alberto Garcia Cabeza
2016-04-20 17:27:58 +02:00
parent 6a26bfd928
commit e3878ff437
4 changed files with 37 additions and 9 deletions

View File

@@ -30,11 +30,11 @@ App.Comments =
$("#js-comment-form-#{id}").toggle()
toggle_arrow: (id) ->
arrow = "i##{id}_arrow"
if $(arrow).hasClass("icon-angle-right")
$(arrow).removeClass("icon-angle-right").addClass("icon-angle-down")
arrow = "span##{id}_arrow"
if $(arrow).hasClass("icon-arrow-right")
$(arrow).removeClass("icon-arrow-right").addClass("icon-arrow-down")
else
$(arrow).removeClass("icon-angle-down").addClass("icon-angle-right")
$(arrow).removeClass("icon-arrow-down").addClass("icon-arrow-right")
initialize: ->
$('body .js-add-comment-link').each ->

View File

@@ -161,7 +161,7 @@ a {
margin-top: rem-calc(-24);
}
.padding {
.padding {
padding-bottom: $line-height;
padding-top: $line-height;
}
@@ -533,6 +533,7 @@ footer {
.footer {
background: $footer-bg;
border-top: 6px solid $brand;
margin-top: $line-height*2;
padding-top: $line-height;
}
@@ -1586,6 +1587,13 @@ table {
margin: rem-calc(6) 0;
padding: rem-calc(6);
[class^="icon-arrow"] {
font-size: rem-calc(18);
left: -20px;
position: absolute;
top: 0;
}
.divider {
color: $text-light;
}

View File

@@ -541,16 +541,27 @@
color: $border;
}
.investment-project-show p {
word-break: break-word;
}
// 04. List participation
// - - - - - - - - - - - - - - - - - - - - - - - - -
.debates-list, .proposals-list {
.debates-list, .proposals-list, .investment-projects-list {
@media (min-width: $small-breakpoint) {
margin-bottom: rem-calc(48);
}
}
.investment-projects-list {
@media (min-width: $small-breakpoint) {
min-height: $line-height*15;
}
}
.debate, .proposal, .investment-project {
margin-bottom: 0;
margin-top: 0;
@@ -820,7 +831,7 @@
border-left: 1px solid $border;
margin: 0 rem-calc(-12);
min-height: rem-calc(180);
padding-top: $line-height*2;
padding-top: $line-height*1.5;
&:after {
content: none;
@@ -860,6 +871,15 @@
.no-supports-allowed p, .no-supports-allowed a {
color: white;
}
.share-supported {
.social-share-button-twitter,
.social-share-button-facebook,
.social-share-button-google_plus {
color: $budget;
}
}
}
}

View File

@@ -73,8 +73,8 @@
</span>
<% if comment.children.size > 0 %>
<%= link_to "", class: "js-toggle-children", data: {'id': "#{dom_id(comment)}"} do %>
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-angle-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
<%= link_to "", class: "js-toggle-children relative", data: {'id': "#{dom_id(comment)}"} do %>
<span id="<%= dom_id(comment) %>_children_arrow" class="icon-arrow-down"></span> <%= t("comments.comment.responses", count: comment.children.size) %>
<% end %>
<% else %>
<%= t("comments.comment.responses", count: 0) %>