aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-05 16:38:24 -0800
committerfriendica <info@friendica.com>2012-01-05 16:38:24 -0800
commitb99cb511ca665bad0022de2ca43b5de78b3ffdbf (patch)
tree792ef6a835be450e65b2849b18ebf54e7ee6c2d8 /js
parent53878625f6ecc014283cefbd84f92b6f1294b8a3 (diff)
downloadvolse-hubzilla-b99cb511ca665bad0022de2ca43b5de78b3ffdbf.tar.gz
volse-hubzilla-b99cb511ca665bad0022de2ca43b5de78b3ffdbf.tar.bz2
volse-hubzilla-b99cb511ca665bad0022de2ca43b5de78b3ffdbf.zip
comment preview
Diffstat (limited to 'js')
-rw-r--r--js/main.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
index 96c7fa642..009fb55bb 100644
--- a/js/main.js
+++ b/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;