Skip to content

Commit

Permalink
fix: feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hellodeloo committed Jan 23, 2023
1 parent 774df78 commit 72ef1d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
<div id="postinfeedarea{{topic.pk}}">
{% include "forum_conversation/partials/post_feed_form_collapsable.html" with post_form=form inline=1 %}
</div>

<script>
document.getElementById(`collapseButtonPost{{topic.pk}}`).setAttribute('aria-expanded', 'false');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@
</div>
</div>

<script>
document.getElementById(`collapseButtonPost{{topic.pk}}`).setAttribute('aria-expanded', 'false');
document.getElementById(`showmoreposts-button{{topic.pk}}`).className = 'd-none';
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% get_permission 'can_update_topics_to_announces' topic.forum request.user as user_can_change_to_announces %}

{% if user_can_add_post %}
<a data-toggle="collapse" href="#collapsePost{{topic.pk}}" role="button" aria-expanded="false" aria-controls="collapsePost{{topic.pk}}" class="btn btn-primary btn-ico btn-sm mr-1 btn-post-reply">
<a data-toggle="collapse" href="#collapsePost{{topic.pk}}" role="button" aria-expanded="false" aria-controls="collapsePost{{topic.pk}}" id="collapseButtonPost{{topic.pk}}" class="btn btn-primary btn-ico btn-sm mr-1 btn-post-reply">
<i class="ri-question-answer-line"></i>
<span>{% trans "Post reply" %}</span>
</a>
Expand All @@ -27,7 +27,7 @@
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="posts"
onclick=HideMe("showmoreposts-button{{topic.pk}}")
onclick=DisabledMe("showmoreposts-button{{topic.pk}}")
>
<span>
<i class="ri-eye-line font-weight-normal"></i>
Expand Down Expand Up @@ -68,3 +68,10 @@
{% endif %}
</div>
{% endif %}


<script>
function DisabledMe(id) {
document.getElementById(id).classList.add('disabled');
}
</script>
8 changes: 0 additions & 8 deletions lacommunaute/templates/forum_conversation/topic_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,3 @@ <h2 class="m-0 font-weight-normal fs-xs text-uppercase text-muted"><i class="ri-
</div>
</div>
{% endif %}

<script>
function HideMe(id) {
var v = document.getElementById(id);
v.style.display = "none";
v.className = "";
}
</script>

0 comments on commit 72ef1d2

Please sign in to comment.