Replace obsolete #comment-preview-inp field by query string append

This commit is contained in:
Hypolite Petovan 2019-07-29 21:58:37 -04:00
parent 0b6f231ad3
commit c25527cbe8
9 changed files with 1 additions and 11 deletions

View File

@ -632,7 +632,6 @@ function post_comment(id) {
unpause();
commentBusy = true;
$('body').css('cursor', 'wait');
$("#comment-preview-inp-" + id).val("0");
$.post(
"item",
$("#comment-edit-form-" + id).serialize(),
@ -661,11 +660,10 @@ function post_comment(id) {
}
function preview_comment(id) {
$("#comment-preview-inp-" + id).val("1");
$("#comment-edit-preview-" + id).show();
$.post(
"item",
$("#comment-edit-form-" + id).serialize(),
$("#comment-edit-form-" + id).serialize() + '&preview=1',
function(data) {
if (data.preview) {
$("#comment-edit-preview-" + id).html(data.preview);

View File

@ -10,7 +10,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}" >

View File

@ -3,7 +3,6 @@
<div id="profile-jot-wrapper">
<form class="comment-edit-form" data-item-id="{{$id}}" id="comment-edit-form-{{$id}}" action="compose/{{$type}}" method="post">
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<input type="hidden" name="post_type" value="{{$posttype}}" />
<input type="hidden" name="wall" value="{{$wall}}" />

View File

@ -6,7 +6,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
<input type="hidden" name="return" value="{{$return_path}}" />
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}">
<a class="comment-edit-photo-link" href="{{$mylink}}" title="{{$mytitle}}"><img class="my-comment-photo" src="{{$myphoto}}" alt="{{$mytitle}}" title="{{$mytitle}}" /></a>

View File

@ -10,7 +10,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}">

View File

@ -6,7 +6,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
<input type="hidden" name="return" value="{{$return_path}}" />
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}">
<a class="comment-edit-photo-link" href="{{$mylink}}" title="{{$mytitle}}"><img class="my-comment-photo" src="{{$myphoto}}" alt="{{$mytitle}}" title="{{$mytitle}}" /></a>

View File

@ -10,7 +10,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<p class="comment-edit-bb-{{$id}} comment-icon-list">

View File

@ -5,7 +5,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}">

View File

@ -10,7 +10,6 @@
<input type="hidden" name="parent" value="{{$parent}}" />
{{*<!--<input type="hidden" name="return" value="{{$return_path}}" />-->*}}
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
<div class="comment-edit-photo" id="comment-edit-photo-{{$id}}">