Merge branch 'dev'

This commit is contained in:
zotlabs 2018-09-19 22:02:33 -07:00
commit 1c368e8d7a
5 changed files with 21 additions and 1 deletions

View file

@ -1019,7 +1019,7 @@ class Activity {
// We may have been passed a cached entry. If it is, and the cache duration has expired // We may have been passed a cached entry. If it is, and the cache duration has expired
// fetch a fresh copy before continuing. // 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); $person_obj = ActivityStreams::fetch($url);
} }

View file

@ -798,6 +798,7 @@ class ThreadItem {
'$myphoto' => $observer['xchan_photo_s'], '$myphoto' => $observer['xchan_photo_s'],
'$comment' => t('Comment'), '$comment' => t('Comment'),
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$edat' => t('Add Conversation Mentions'),
'$edbold' => t('Bold'), '$edbold' => t('Bold'),
'$editalic' => t('Italic'), '$editalic' => t('Italic'),
'$eduline' => t('Underline'), '$eduline' => t('Underline'),

View file

@ -258,6 +258,21 @@ function commentInsert(obj, id) {
$("#comment-edit-text-" + id).val(tmpStr + ins); $("#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) { function insertbbcomment(comment, BBcode, id) {
// allow themes to override this // allow themes to override this
if(typeof(insertFormatting) != 'undefined') if(typeof(insertFormatting) != 'undefined')

View file

@ -25,6 +25,9 @@
<div id="comment-tools-{{$id}}" class="pt-2 comment-tools"> <div id="comment-tools-{{$id}}" class="pt-2 comment-tools">
<div id="comment-edit-bb-{{$id}}" class="btn-toolbar pull-left"> <div id="comment-edit-bb-{{$id}}" class="btn-toolbar pull-left">
<div class="btn-group mr-2"> <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;"> <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> <i class="fa fa-bold comment-icon"></i>
</button> </button>

View file

@ -5,6 +5,7 @@
<div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;"> <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
{{/if}} {{/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}}"> <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}}@&#123;{{$a}}&#125; {{/foreach}}</span>{{/if}}
<a name="item_{{$item.id}}" ></a> <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="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}}"> <div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}">