Ensure the preview parameter is set to 1 when doing a preview
- The element #jot-preview might not exist
This commit is contained in:
parent
b64b18e6f7
commit
e8f91d7e54
|
@ -764,11 +764,10 @@ function showHideComments(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function preview_post() {
|
function preview_post() {
|
||||||
$("#jot-preview").val("1");
|
|
||||||
$("#jot-preview-content").show();
|
$("#jot-preview-content").show();
|
||||||
$.post(
|
$.post(
|
||||||
"item",
|
"item",
|
||||||
$("#profile-jot-form").serialize(),
|
$("#profile-jot-form").serialize() + '&preview=1',
|
||||||
function(data) {
|
function(data) {
|
||||||
if (data.preview) {
|
if (data.preview) {
|
||||||
$("#jot-preview-content").html(data.preview);
|
$("#jot-preview-content").html(data.preview);
|
||||||
|
@ -778,7 +777,6 @@ function preview_post() {
|
||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
$("#jot-preview").val("0");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue