forked from MarseyWorld/MarseyWorld
parent
af5b4b5760
commit
3fa8db36d9
|
@ -88,14 +88,14 @@
|
|||
</div>
|
||||
|
||||
{% if render_replies %}
|
||||
{% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
|
||||
{% if ajax or level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
|
||||
<div id="replies-of-{{c.fullname}}">
|
||||
{% for reply in replies %}
|
||||
{{single_comment(reply, level=level+1)}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% elif replies %}
|
||||
<div id="morecomments-{{c.id}}" class="mt-2 more-comments">
|
||||
<div id="replies-of-{{c.fullname}}" class="mt-2 more-comments">
|
||||
<button id="btn-{{c.id}}" class="d-none d-md-block btn btn-primary" onclick="morecomments('{{c.id}}')">More comments</button>
|
||||
<a class="d-md-none" href="{{c.morecomments}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
|
@ -599,14 +599,14 @@
|
|||
{% endif %}
|
||||
|
||||
{% if render_replies %}
|
||||
{% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
|
||||
{% if ajax or level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
|
||||
<div id="replies-of-{{c.fullname}}">
|
||||
{% for reply in replies %}
|
||||
{{single_comment(reply, level=level+1)}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% elif replies %}
|
||||
<div id="morecomments-{{c.id}}" class="mt-2 more-comments">
|
||||
<div id="replies-of-{{c.fullname}}" class="mt-2 more-comments">
|
||||
<button id="btn-{{c.id}}" class="d-none d-md-block btn btn-primary" onclick="morecomments('{{c.id}}')">More comments</button>
|
||||
<a class="d-md-none" href="{{c.morecomments}}">More comments <i class="fas fa-long-arrow-right ml-1"></i></a>
|
||||
</div>
|
||||
|
@ -911,7 +911,7 @@
|
|||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
xhr.onload=function(){
|
||||
if (xhr.status==200) {
|
||||
let e = document.getElementById(`morecomments-${cid}`)
|
||||
let e = document.getElementById(`replies-of-t3_${cid}`)
|
||||
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
|
||||
bs_trigger(e)
|
||||
|
||||
|
@ -945,4 +945,4 @@
|
|||
<div id="viewmore-{{offset}}"><button id="viewbtn" class="btn btn-primary" onclick="viewmore({{pid}},'{{sort}}',{{offset}},{{ids}})">VIEW MORE COMMENTS</a></div>
|
||||
{% endif %}
|
||||
|
||||
</body>
|
||||
</body>
|
Loading…
Reference in New Issue