mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
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
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue