]> git.mxchange.org Git - friendica.git/commitdiff
use scrollToItem instead of own function
authorJakobus Schürz <jakobus.schuerz@home.arpa>
Thu, 5 Oct 2023 15:19:16 +0000 (17:19 +0200)
committerJakobus Schürz <jakobus.schuerz@home.arpa>
Thu, 5 Oct 2023 15:19:16 +0000 (17:19 +0200)
rename isanswerto and "Is answer to" to isreplyto and "is reply to"

src/Object/Post.php
view/theme/frio/js/theme.js
view/theme/frio/templates/wall_thread.tpl

index 77912c7b85c5e046a70e24f276c4d057f9493de7..a3063cbe130bc9cca039902c69492780c0ea5670 100644 (file)
@@ -498,7 +498,7 @@ class Post
 
                $tmp_item = [
                        'parentguid'      => $parent_guid,
-                       'isanswerto'      => DI::l10n()->t('is answer to %s', $parent_username),
+                       'isreplyto'      => DI::l10n()->t('is reply to %s', $parent_username),
                        'template'        => $this->getTemplate(),
                        'type'            => implode('', array_slice(explode('/', $item['verb']), -1)),
                        'comment_firstcollapsed' => false,
index 733752cfd9669e89d3ed731f27f64bd4ae0e35ac..ef71b8c1d0339be304ca7e6b4fafa31375ff2a82 100644 (file)
@@ -184,7 +184,6 @@ $(document).ready(function () {
                if (typeof searchValue !== "undefined") {
                        $("#nav-search-input-field").val(searchValue);
                }
-
        }
 
        // move the "Save the search" button to the second navbar
@@ -942,13 +941,4 @@ function toggleDropdownText(elm) {
 function hasClass(elem, cls) {
        return (" " + elem.className + " ").indexOf(" " + cls + " ") > -1;
 }
-
-// Go to parent for "is answer to <user>" link in comments below username
-function goToParentItem(plink, pguid) {
-       history.pushState({},"",plink);
-       var loc = plink.split("/");
-       loc.pop();
-       loc.push(pguid);
-       location.href = loc.join("/");
-}
 // @license-end
index f05a41f032ed85f42a4d5dada9944eacf4dfbadb..93abcd2fd7ce806f90e81abe6cd6682be7a02c85 100644 (file)
@@ -60,7 +60,7 @@ as the value of $top_child_total (this is done at the end of this file)
 {{/if}}
        <div class="media {{$item.shiny}}">
        {{if $item.parentguid}}
-               <a id="btn-{{$item.id}}" class="time" href="javascript:;" onclick="goToParentItem('{{$item.plink.orig}}', '{{$item.parentguid}}');">{{$item.isanswerto}}</a>
+               <a id="btn-{{$item.id}}" class="time" href="javascript:;" onclick="scrollToItem('item-' + '{{$item.parentguid}}');">{{$item.isreplyto}}</a>
                {{if $item.reshared}}<span class="hidden-xs">&#x2022;</span>{{/if}}
                <br class="visible-xs">
        {{/if}}