fdsfsdsfd
This commit is contained in:
parent
f6667ed942
commit
0e505e894e
5 changed files with 8 additions and 14 deletions
|
@ -160,7 +160,7 @@ post_reply=function(id){
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status==200) {
|
if (xhr.status==200) {
|
||||||
commentForm=document.getElementById('comment-form-space-'+id);
|
commentForm=document.getElementById('comment-form-space-'+id);
|
||||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
commentForm.innerHTML=xhr.response;
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||||
myToast.hide();
|
myToast.hide();
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||||
|
@ -194,7 +194,7 @@ comment_edit=function(id){
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status==200) {
|
if (xhr.status==200) {
|
||||||
commentForm=document.getElementById('comment-text-'+id);
|
commentForm=document.getElementById('comment-text-'+id);
|
||||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
commentForm.innerHTML=xhr.response;
|
||||||
document.getElementById('cancel-edit-'+id).click()
|
document.getElementById('cancel-edit-'+id).click()
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||||
myToast.hide();
|
myToast.hide();
|
||||||
|
@ -229,7 +229,7 @@ post_comment=function(fullname){
|
||||||
xhr.onload=function(){
|
xhr.onload=function(){
|
||||||
if (xhr.status==200) {
|
if (xhr.status==200) {
|
||||||
commentForm=document.getElementById('comment-form-space-'+fullname);
|
commentForm=document.getElementById('comment-form-space-'+fullname);
|
||||||
commentForm.innerHTML=JSON.parse(xhr.response)["html"];
|
commentForm.innerHTML=xhr.response;
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||||
myToast.hide();
|
myToast.hide();
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||||
|
|
|
@ -575,10 +575,7 @@ def api_comment(v):
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return c.json
|
if request.headers.get("Authorization"): return c.json
|
||||||
else: return jsonify({"html": render_template("comments.html",
|
else: return render_template("comments.html", v=v, comments=[c])
|
||||||
v=v,
|
|
||||||
comments=[c],
|
|
||||||
)})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -797,7 +794,7 @@ def edit_comment(cid, v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return jsonify({"html": c.body_html})
|
return c.body_html
|
||||||
|
|
||||||
|
|
||||||
@app.post("/delete/comment/<cid>")
|
@app.post("/delete/comment/<cid>")
|
||||||
|
|
|
@ -314,10 +314,7 @@ def messagereply(v):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
return jsonify({"html": render_template("comments.html",
|
return render_template("comments.html", v=v, comments=[new_comment])
|
||||||
v=v,
|
|
||||||
comments=[new_comment],
|
|
||||||
)})
|
|
||||||
|
|
||||||
@app.get("/2faqr/<secret>")
|
@app.get("/2faqr/<secret>")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
<script src="/assets/js/comments_v.js?v=3"></script>
|
<script src="/assets/js/comments_v.js?v=4"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
{% if 'marsey.tech' in request.host %}
|
{% if 'marsey.tech' in request.host %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/assets/js/comments_v.js?v=3"></script>
|
<script src="/assets/js/comments_v.js?v=4"></script>
|
||||||
{% include "award_modal.html" %}
|
{% include "award_modal.html" %}
|
||||||
{% include "emoji_modal.html" %}
|
{% include "emoji_modal.html" %}
|
||||||
{% include "gif_modal.html" %}
|
{% include "gif_modal.html" %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue