diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-01 06:24:58 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-01 06:24:58 +0200 |
commit | c340416c9424c285de4701158714541f24d66e85 (patch) | |
tree | fcdaa73845baf128b6e1517ea83c6c05b088d458 /view | |
parent | 9af8a1d30cb6aeda8a92dd5e4a333fdd2c710861 (diff) | |
download | volse-hubzilla-c340416c9424c285de4701158714541f24d66e85.tar.gz volse-hubzilla-c340416c9424c285de4701158714541f24d66e85.tar.bz2 volse-hubzilla-c340416c9424c285de4701158714541f24d66e85.zip |
Add 'reply on comment' code
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js index 8f644dc8e..325ad9a51 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1148,6 +1148,16 @@ function doprofilelike(ident, verb) { $.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; }); } +function doreply(parent, ident, owner, hint) { + var form = $('#comment-edit-form-' + parent.toString()); + form.find('input[name=parent]').val(ident); + var i = form.find('button[type=submit]'); + var btn = i.html().replace(/<[^>]*>/g, '').trim(); + i.html('<i class="fa fa-reply" ></i> ' + btn); + i.prop('title', hint); + form.find('textarea').val("@{" + owner + "}\n"); + $('#comment-edit-text-' + parent.toString()).focus(); +} function dropItem(url, object) { |