From e8f91d7e5450068cbf1d6893287f2cdc8e973e02 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 28 Nov 2019 12:47:53 -0500 Subject: [PATCH] Ensure the preview parameter is set to 1 when doing a preview - The element #jot-preview might not exist --- view/js/main.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }