forked from leftypol/leftypol
quick-post-controls.js: fix #184
This commit is contained in:
parent
053aacb8bc
commit
333681a95b
1 changed files with 2 additions and 8 deletions
|
@ -15,13 +15,11 @@
|
|||
|
||||
$(document).ready(function() {
|
||||
let open_form = function() {
|
||||
let thread = $(this).parent().parent().parent().hasClass('op');
|
||||
let id = $(this).attr('name').match(/^delete_(\d+)$/)[1];
|
||||
|
||||
if (this.checked) {
|
||||
let post_form = $('<form class="post-actions" method="post" style="margin:10px 0 0 0">' +
|
||||
'<div style="text-align:right">' +
|
||||
(!thread ? '<hr>' : '') +
|
||||
'<div style="text-align:right"><hr>' +
|
||||
|
||||
'<input type="hidden" name="delete_' + id + '">' +
|
||||
|
||||
|
@ -69,11 +67,7 @@ $(document).ready(function() {
|
|||
|
||||
post_form.find('input[type="password"]').val(localStorage.password);
|
||||
|
||||
if (thread) {
|
||||
post_form.prependTo($(this).parent().parent().find('div.body'));
|
||||
} else {
|
||||
post_form.appendTo($(this).parent().parent());
|
||||
}
|
||||
post_form.appendTo($(this).parent().parent());
|
||||
|
||||
$(window).trigger('quick-post-controls', post_form);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue