forked from rDrama/rDrama
fix cancel button
parent
fa30af6e5c
commit
b649a16b46
|
@ -142,7 +142,7 @@ function post_reply(id){
|
||||||
|
|
||||||
document.getElementById('reply-form-body-'+id).value = ''
|
document.getElementById('reply-form-body-'+id).value = ''
|
||||||
document.getElementById('message-reply-'+id).innerHTML = ''
|
document.getElementById('message-reply-'+id).innerHTML = ''
|
||||||
toggleReplyBox('reply-message-c_'+id)
|
toggleReplyBox('reply-to-c_'+id)
|
||||||
const fileupload = document.getElementById('file-upload')
|
const fileupload = document.getElementById('file-upload')
|
||||||
if (fileupload) {
|
if (fileupload) {
|
||||||
fileupload.value = null;
|
fileupload.value = null;
|
||||||
|
|
|
@ -539,10 +539,10 @@
|
||||||
<button type="button" class="btn btn-primary mr-3 {% if not c.author.is_muted %}d-none{% endif %}" id="unmute-user-{{c.id}}" onclick="postToastSwitch(this,'/unmute_user/{{c.author.id}}','mute-user-{{c.id}}','unmute-user-{{c.id}}','d-none')">Unmute</button>
|
<button type="button" class="btn btn-primary mr-3 {% if not c.author.is_muted %}d-none{% endif %}" id="unmute-user-{{c.id}}" onclick="postToastSwitch(this,'/unmute_user/{{c.author.id}}','mute-user-{{c.id}}','unmute-user-{{c.id}}','d-none')">Unmute</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button type="button" class="btn btn-primary nobackground" onclick="toggleReplyBox('reply-message-{{c.fullname}}')">Reply</button>
|
<button type="button" class="btn btn-primary nobackground" onclick="toggleReplyBox('reply-to-{{c.fullname}}')">Reply</button>
|
||||||
|
|
||||||
{# TODO: swap to comment_reply_box macro #}
|
{# TODO: swap to comment_reply_box macro #}
|
||||||
<div id="reply-message-{{c.fullname}}" class="d-none">
|
<div id="reply-to-{{c.fullname}}" class="d-none">
|
||||||
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
|
<div id="comment-form-space-{{c.id}}" class="comment-write collapsed child">
|
||||||
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
|
<form id="reply-to-message-{{c.id}}" action="/reply" method="post" class="input-group" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="formkey" value="{{v|formkey}}">
|
<input type="hidden" name="formkey" value="{{v|formkey}}">
|
||||||
|
@ -558,7 +558,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" onclick="document.getElementById('reply-message-{{c.id}}').classList.add('d-none');remove_dialog()" class="btn btn-link text-muted ml-auto">Cancel</button>
|
<button type="button" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('d-none');remove_dialog()" class="btn btn-link text-muted ml-auto">Cancel</button>
|
||||||
<button type="button" id="save-reply-to-{{c.id}}" class="btn btn-primary ml-2" onclick="post_reply('{{c.id}}');remove_dialog()">Reply</button>
|
<button type="button" id="save-reply-to-{{c.id}}" class="btn btn-primary ml-2" onclick="post_reply('{{c.id}}');remove_dialog()">Reply</button>
|
||||||
</form>
|
</form>
|
||||||
<div id="message-reply-{{c.id}}" class="preview mt-2"></div>
|
<div id="message-reply-{{c.id}}" class="preview mt-2"></div>
|
||||||
|
|
|
@ -136,7 +136,9 @@
|
||||||
{% 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" onclick="postComment('{{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" onclick="postComment('{{target_fullname}}', '{{hide}}');remove_dialog();">Comment</button>
|
||||||
<button type="button" onclick="document.getElementById('reply-to-{{target_fullname}}').classList.add('d-none');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r mr-3">Cancel</button>
|
{% if target_fullname.startswith('c_') %}
|
||||||
|
<button type="button" onclick="document.getElementById('reply-to-{{target_fullname}}').classList.add('d-none');remove_dialog()" class="btn btn-link text-muted ml-auto fl-r mr-3">Cancel</button>
|
||||||
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
<div id="form-preview-{{target_fullname}}" class="preview mb-3 mt-5"></div>
|
<div id="form-preview-{{target_fullname}}" class="preview mb-3 mt-5"></div>
|
||||||
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a></div>
|
<div class="form-text text-small p-0 m-0"><a href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a></div>
|
||||||
|
|
Loading…
Reference in New Issue