diff options
author | Max Kostikov <max@kostikov.co> | 2019-04-30 17:34:56 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-04-30 17:34:56 +0200 |
commit | 21637e033c2f43e99189e6c17f383c3efa3315a2 (patch) | |
tree | 9f685b33ec8d4828fef8378586bcfa7f04238f99 /view | |
parent | 9ebf2dc97be4de7112422aa88421c2c1d5ede94c (diff) | |
download | volse-hubzilla-21637e033c2f43e99189e6c17f383c3efa3315a2.tar.gz volse-hubzilla-21637e033c2f43e99189e6c17f383c3efa3315a2.tar.bz2 volse-hubzilla-21637e033c2f43e99189e6c17f383c3efa3315a2.zip |
Add JS 'doreply' function
Diffstat (limited to 'view')
-rwxr-xr-x | view/tpl/conv_item.tpl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 29401a35c..522a1b8ec 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -1,3 +1,15 @@ +<script> +function doreply(parent, ident, owner, name) { + 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', '{{$item.reply_to.2}} ' + name); + form.find('textarea').val("@{" + owner + "}\n"); + $('#comment-edit-text-' + parent.toString()).focus(); +} +</script> {{if $item.comment_firstcollapsed}} <div class="hide-comments-outer fakelink" onclick="showHideComments({{$item.id}});"> <span id="hide-comments-{{$item.id}}" class="hide-comments">{{$item.hide_text}}</span> <span id="hide-comments-total-{{$item.id}}" class="hide-comments-total">{{$item.num_comments}}</span> |