Update actionbar share and comment
This commit is contained in:
parent
a5c045986b
commit
b6a09c9ebb
10 changed files with 35 additions and 27 deletions
|
@ -1,7 +1,12 @@
|
|||
{% set can_comment = request.user.is_authenticated and comment_form and not comment_lock %}
|
||||
<div id="comments" class="comment-area">
|
||||
<h2 id="comment-header"><i style="padding-right: 0.3em" class="fa fa-comments"></i>{{ _('Comments') }}</h2>
|
||||
<p> <a href="" id="write-comments" > Write comments </a> </p>
|
||||
{% if request.user.is_authenticated and comment_form and not comment_lock %}
|
||||
<h2 id="comment-header">
|
||||
<i style="padding-right: 0.3em" class="fa fa-comments"></i>{{ _('Comments') }}
|
||||
{% if can_comment %}
|
||||
<a href="" id="write-comment" style="float: right; font-size: 0.6em; margin-right: -26px;"> {{ _('Write comment') }} </a>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% if can_comment %}
|
||||
<div id="new-comment" class="form-area comment-submit" style="display: none;" >
|
||||
{% block comment_submit_title %}
|
||||
<h3>{{ _('New comment') }}</h3>
|
||||
|
|
|
@ -212,25 +212,12 @@
|
|||
$comment.find('.bad-comment-body').hide();
|
||||
};
|
||||
|
||||
$("#share-button").click( function() {
|
||||
navigator.clipboard
|
||||
.writeText(window.location.href)
|
||||
.then( () => {
|
||||
alert("Copied link to this post");
|
||||
});
|
||||
});
|
||||
|
||||
$("#write-comments").click( function(event) {
|
||||
$("#write-comment").click( function(event) {
|
||||
event.preventDefault();
|
||||
$("#new-comment").show("slow");
|
||||
$("#write-comments").hide();
|
||||
$("#write-comment").hide();
|
||||
});
|
||||
|
||||
$('#comment-button').click( function() {
|
||||
$('#comment-section').show();
|
||||
$('#comment-announcement').hide();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
{% endcompress %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue