ccc
This commit is contained in:
parent
81f2ac0cdc
commit
accf809e75
2 changed files with 10 additions and 2 deletions
|
@ -117,6 +117,9 @@ function delete_commentModal(id) {
|
|||
};
|
||||
|
||||
function post_reply(id){
|
||||
const btn = document.getElementById(`save-reply-to-${id}`)
|
||||
btn.classList.add('disabled');
|
||||
|
||||
var form = new FormData();
|
||||
form.append('formkey', formkey());
|
||||
form.append('parent_id', id);
|
||||
|
@ -137,12 +140,16 @@ function post_reply(id){
|
|||
}
|
||||
catch(e) {console.log(e)}
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
btn.classList.remove('disabled');
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
}
|
||||
|
||||
function comment_edit(id){
|
||||
const btn = document.getElementById(`edit-btn-${id}`)
|
||||
btn.classList.add('disabled');
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
|
@ -166,6 +173,7 @@ function comment_edit(id){
|
|||
}
|
||||
catch(e) {console.log(e)}
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
btn.classList.remove('disabled');
|
||||
}
|
||||
}
|
||||
xhr.send(form)
|
||||
|
|
|
@ -281,7 +281,7 @@
|
|||
<input autocomplete="off" id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image/video';" hidden>
|
||||
</label>
|
||||
</div>
|
||||
<a role="button" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
||||
<a id="edit-btn-{{c.id}}" role="button" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
||||
<a id="cancel-edit-{{c.id}}" role="button" onclick="toggleEdit('{{c.id}}')" class="btn btn-link text-muted ml-auto cancel-form fl-r commentmob">Cancel</a>
|
||||
</form>
|
||||
<div id="preview-edit-{{c.id}}" class="preview-edit mb-3 mt-5"></div>
|
||||
|
@ -864,7 +864,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/static/assets/js/marked.js?a=220"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=232"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=233"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/clipboard.js?a=220"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue