From e80c99ad744f675ff193802fa2fe91d1c1207d01 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 29 Apr 2019 23:29:16 +0200 Subject: Add 'reply to comment' button --- view/tpl/conv_item.tpl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'view') diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 428529de2..29401a35c 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -102,6 +102,11 @@ {{/if}} + {{if $item.reply_to}} + + {{/if}} {{if $item.isevent}}
{{/if}} {{if $item.reply_to}} - {{/if}} -- cgit v1.2.3 From c340416c9424c285de4701158714541f24d66e85 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 1 May 2019 06:24:58 +0200 Subject: Add 'reply on comment' code --- view/js/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'view') 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(' ' + btn); + i.prop('title', hint); + form.find('textarea').val("@{" + owner + "}\n"); + $('#comment-edit-text-' + parent.toString()).focus(); +} function dropItem(url, object) { -- cgit v1.2.3