mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
comment preview
This commit is contained in:
parent
53878625f6
commit
b99cb511ca
5 changed files with 31 additions and 3 deletions
23
js/main.js
23
js/main.js
|
@ -389,6 +389,7 @@
|
|||
unpause();
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$("#comment-preview-inp-" + id).val("0");
|
||||
$.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
|
@ -411,6 +412,28 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
function preview_comment(id) {
|
||||
$("#comment-preview-inp-" + id).val("1");
|
||||
$("#comment-edit-preview-" + id).show();
|
||||
$.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
function(data) {
|
||||
if(data.preview) {
|
||||
|
||||
$("#comment-edit-preview-" + id).html(data.preview);
|
||||
$("#comment-edit-preview-" + id + " a").removeAttr('href');
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function unpause() {
|
||||
// unpause auto reloads if they are currently stopped
|
||||
totStopped = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue