mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-22 04:35:24 +00:00
Merge branch 'dev'
This commit is contained in:
commit
1c368e8d7a
5 changed files with 21 additions and 1 deletions
|
@ -1019,7 +1019,7 @@ class Activity {
|
|||
// We may have been passed a cached entry. If it is, and the cache duration has expired
|
||||
// fetch a fresh copy before continuing.
|
||||
|
||||
if(array_key_exists($person_obj['cached']) && array_key_exists($person_obj['updated']) && $person_obj['updated'] < datetime_convert('UTC','UTC','now - ' . self::$ACTOR_CACHE_DAYS . ' days')) {
|
||||
if(array_key_exists($person_obj['cached']) && array_key_exists('updated',$person_obj) && $person_obj['updated'] < datetime_convert('UTC','UTC','now - ' . self::$ACTOR_CACHE_DAYS . ' days')) {
|
||||
$person_obj = ActivityStreams::fetch($url);
|
||||
}
|
||||
|
||||
|
|
|
@ -798,6 +798,7 @@ class ThreadItem {
|
|||
'$myphoto' => $observer['xchan_photo_s'],
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$edat' => t('Add Conversation Mentions'),
|
||||
'$edbold' => t('Bold'),
|
||||
'$editalic' => t('Italic'),
|
||||
'$eduline' => t('Underline'),
|
||||
|
|
|
@ -258,6 +258,21 @@ function commentInsert(obj, id) {
|
|||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
}
|
||||
|
||||
function commentAuthors(id) {
|
||||
var auths = $("#thread-authors-" + id).html();
|
||||
if(typeof(auths) != 'undefined') {
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == '$comment') {
|
||||
tmpStr = '';
|
||||
$("#comment-edit-text-" + id).addClass("expanded");
|
||||
openMenu("comment-tools-" + id);
|
||||
}
|
||||
$("#comment-edit-text-" + id).val(tmpStr + auths);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function insertbbcomment(comment, BBcode, id) {
|
||||
// allow themes to override this
|
||||
if(typeof(insertFormatting) != 'undefined')
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
<div id="comment-tools-{{$id}}" class="pt-2 comment-tools">
|
||||
<div id="comment-edit-bb-{{$id}}" class="btn-toolbar pull-left">
|
||||
<div class="btn-group mr-2">
|
||||
<button class="btn btn-outline-secondary btn-sm" title="{{$edat}}" onclick="commentAuthors({{$id}}); return false;">
|
||||
<i class="fa fa-user-plus comment-icon"></i>
|
||||
</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', {{$id}}); return false;">
|
||||
<i class="fa fa-bold comment-icon"></i>
|
||||
</button>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
|
||||
{{/if}}
|
||||
<div id="thread-wrapper-{{$item.id}}" class="thread-wrapper{{if $item.toplevel}} {{$item.toplevel}} generic-content-wrapper h-entry {{else}} u-comment h-cite {{/if}} item_{{$item.submid}}">
|
||||
{{if $item.authors}}<span id="thread-authors-{{$item.id}}" style="display: none;">{{foreach $item.authors as $a}}@{{{$a}}} {{/foreach}}</span>{{/if}}
|
||||
<a name="item_{{$item.id}}" ></a>
|
||||
<div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" >
|
||||
<div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}">
|
||||
|
|
Loading…
Reference in a new issue