aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-29 23:30:51 +0200
committerMax Kostikov <max@kostikov.co>2019-04-29 23:30:51 +0200
commit31e04378cda30421159765fba029ddc7859dfbe5 (patch)
treedb98bd3f018efd3dfb0f189b9d9f1e99d6787181 /view/js
parente80c99ad744f675ff193802fa2fe91d1c1207d01 (diff)
downloadvolse-hubzilla-31e04378cda30421159765fba029ddc7859dfbe5.tar.gz
volse-hubzilla-31e04378cda30421159765fba029ddc7859dfbe5.tar.bz2
volse-hubzilla-31e04378cda30421159765fba029ddc7859dfbe5.zip
Add 'reply to comment' processing
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 1322c2112..43e4634dd 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -231,6 +231,9 @@ function handle_comment_form(e) {
$('#' + emptyCommentElm).removeAttr('tabindex');
$('#' + emptySubmitElm).removeAttr('tabindex');
form.find(':not(.comment-edit-text)').hide();
+ form.find(':input[name=parent]').val(emptyCommentElm.replace(/\D/g,''));
+ var btn = form.find(':button[type=submit]').html();
+ form.find(':button[type=submit]').html(btn.replace(/<[^>]*>/g, '').trim());
}
});
@@ -1140,6 +1143,16 @@ function dolike(ident, verb) {
liking = 1;
}
+function doreply(parent, ident, owner) {
+ form = $('#comment-edit-form-' + parent.toString());
+ form.find('input[name=parent]').val(ident);
+ var btn = form.find('button[type=submit]').html();
+ form.find('button[type=submit]').html('<i class="fa fa-reply" ></i> ' + btn);
+ taid = '#comment-edit-text-' + parent.toString();
+ $(taid).val("@{" + owner + "}\n");
+ $(taid).focus();
+}
+
function doprofilelike(ident, verb) {
$.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; });
}