diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-05 18:15:58 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-05 18:15:58 +0200 |
commit | 9b947c837093ec0d762c3b0e2610b17de9dba786 (patch) | |
tree | e8fab6bada4cc06932ee64fa717144c5a3262343 /view | |
parent | f56371c79bb401b7f7a627daf8aa15f61f5bc95f (diff) | |
parent | 14eb4326e76bddaec8421fdaa87e0c3ac9bb76e0 (diff) | |
download | volse-hubzilla-9b947c837093ec0d762c3b0e2610b17de9dba786.tar.gz volse-hubzilla-9b947c837093ec0d762c3b0e2610b17de9dba786.tar.bz2 volse-hubzilla-9b947c837093ec0d762c3b0e2610b17de9dba786.zip |
Merge branch 'dev' into 'dev'
Threaded comments usability imrovements
See merge request hubzilla/core!1633
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 10 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/view/js/main.js b/view/js/main.js index 8dfb04779..5592fd63d 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1160,8 +1160,14 @@ function doreply(parent, ident, owner, hint) { } function doscroll(parent, hidden) { - $('.back-to-reply').remove(); - var pos = $(window).scrollTop(); + var back = $('.back-to-reply'); + if(back.length == 0) { + var pos = Math.round($(window).scrollTop()); + } + else { + var pos = back.attr('href').replace(/\D/g,'') + } + back.remove(); var x = '#hide-comments-outer-' + hidden.toString(); if($(x).length !== 0) { x = $(x).attr("onclick").replace(/\D/g,''); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 20177038f..eceff51c7 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -28,7 +28,7 @@ {{/if}} <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment && !$item.photo}} wall-item-head-new rounded-top{{/if}}" > {{if $item.thr_parent}} - <a href="javascript:doscroll('{{$item.thr_parent}}',{{$item.parent}});" title="{{$item.reply_to.3}}"><i class="fa fa-angle-double-up float-right"> </i></a> + <a href="javascript:doscroll('{{$item.thr_parent}}',{{$item.parent}});" title="{{$item.top_hint}}"><i class="fa fa-angle-double-up float-right"> </i></a> {{/if}} <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> |