From: Hypolite Petovan Date: Thu, 28 Nov 2019 17:47:53 +0000 (-0500) Subject: Ensure the preview parameter is set to 1 when doing a preview X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e8f91d7e5450068cbf1d6893287f2cdc8e973e02;p=friendica.git Ensure the preview parameter is set to 1 when doing a preview - The element #jot-preview might not exist --- diff --git a/view/js/main.js b/view/js/main.js index 94644c5dfd..e15ee77e19 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -764,11 +764,10 @@ function showHideComments(id) { } function preview_post() { - $("#jot-preview").val("1"); $("#jot-preview-content").show(); $.post( "item", - $("#profile-jot-form").serialize(), + $("#profile-jot-form").serialize() + '&preview=1', function(data) { if (data.preview) { $("#jot-preview-content").html(data.preview); @@ -778,7 +777,6 @@ function preview_post() { }, "json" ); - $("#jot-preview").val("0"); return true; }