forked from rDrama/rDrama
move function call to js file
parent
036de3e7ae
commit
588a8bb7a0
|
@ -170,6 +170,8 @@ function post_reply(id) {
|
||||||
input.previousElementSibling.innerHTML = '';
|
input.previousElementSibling.innerHTML = '';
|
||||||
input.value = null;
|
input.value = null;
|
||||||
oldfiles[ta.id] = []
|
oldfiles[ta.id] = []
|
||||||
|
|
||||||
|
remove_dialog();
|
||||||
} else {
|
} else {
|
||||||
showToast(false, getMessageFromJsonData(false, data));
|
showToast(false, getMessageFromJsonData(false, data));
|
||||||
}
|
}
|
||||||
|
@ -219,6 +221,8 @@ function comment_edit(id){
|
||||||
input.previousElementSibling.innerHTML = '';
|
input.previousElementSibling.innerHTML = '';
|
||||||
input.value = null;
|
input.value = null;
|
||||||
oldfiles[ta.id] = []
|
oldfiles[ta.id] = []
|
||||||
|
|
||||||
|
remove_dialog();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showToast(false, getMessageFromJsonData(false, data));
|
showToast(false, getMessageFromJsonData(false, data));
|
||||||
|
@ -293,6 +297,8 @@ function post_comment(fullname, hide){
|
||||||
|
|
||||||
const ghost_town_box = document.getElementById('ghost-town-box')
|
const ghost_town_box = document.getElementById('ghost-town-box')
|
||||||
if (ghost_town_box) ghost_town_box.remove()
|
if (ghost_town_box) ghost_town_box.remove()
|
||||||
|
|
||||||
|
remove_dialog();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showToast(false, getMessageFromJsonData(false, data));
|
showToast(false, getMessageFromJsonData(false, data));
|
||||||
|
|
|
@ -273,7 +273,7 @@
|
||||||
</div>
|
</div>
|
||||||
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
|
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
|
||||||
|
|
||||||
<button type="button" id="edit-btn-{{c.id}}" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" data-nonce="{{g.nonce}}" data-onclick="comment_edit('{{c.id}}');remove_dialog()">Save Edit</button>
|
<button type="button" id="edit-btn-{{c.id}}" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" data-nonce="{{g.nonce}}" data-onclick="comment_edit('{{c.id}}')">Save Edit</button>
|
||||||
|
|
||||||
<button type="button" id="cancel-edit-{{c.id}}" data-nonce="{{g.nonce}}" data-onclick="toggleEdit('{{c.id}}');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r commentmob">Cancel</button>
|
<button type="button" id="cancel-edit-{{c.id}}" data-nonce="{{g.nonce}}" data-onclick="toggleEdit('{{c.id}}');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r commentmob">Cancel</button>
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@
|
||||||
|
|
||||||
<button type="button" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" class="btn btn-link text-muted ml-auto" data-toggleelement="#reply-message-{{c.fullname}}" data-toggleattr="d-none">Cancel</button>
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" class="btn btn-link text-muted ml-auto" data-toggleelement="#reply-message-{{c.fullname}}" data-toggleattr="d-none">Cancel</button>
|
||||||
|
|
||||||
<button type="button" id="save-reply-to-{{c.id}}" class="btn btn-primary ml-2" data-nonce="{{g.nonce}}" data-onclick="post_reply('{{c.id}}');remove_dialog()">Reply</button>
|
<button type="button" id="save-reply-to-{{c.id}}" class="btn btn-primary ml-2" data-nonce="{{g.nonce}}" data-onclick="post_reply('{{c.id}}')">Reply</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="message-reply-{{c.id}}" class="preview mt-2"></div>
|
<div id="message-reply-{{c.id}}" class="preview mt-2"></div>
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
{{file_input('file-upload-reply-' ~ target_fullname, False)}}
|
{{file_input('file-upload-reply-' ~ target_fullname, False)}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="save-reply-to-{{target_fullname}}" form="reply-to-{{target_fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" data-nonce="{{g.nonce}}" data-onclick="post_comment('{{target_fullname}}', '{{hide}}');remove_dialog();">Comment</button>
|
<button type="button" id="save-reply-to-{{target_fullname}}" form="reply-to-{{target_fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" data-nonce="{{g.nonce}}" data-onclick="post_comment('{{target_fullname}}', '{{hide}}')">Comment</button>
|
||||||
|
|
||||||
{% if enable_cancel_button %}
|
{% if enable_cancel_button %}
|
||||||
<button type="button" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" data-toggleelement="#reply-to-{{target_fullname}}" data-toggleattr="d-none" class="btn btn-link text-muted ml-auto fl-r mr-3">Cancel</button>
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" data-toggleelement="#reply-to-{{target_fullname}}" data-toggleattr="d-none" class="btn btn-link text-muted ml-auto fl-r mr-3">Cancel</button>
|
||||||
|
|
Loading…
Reference in New Issue