Update compiled assets

This commit is contained in:
Daniel Supernault 2018-06-17 23:28:34 -06:00
parent aeb2a1679d
commit f7cd91110d
4 changed files with 5 additions and 4 deletions

View file

@ -34,7 +34,7 @@ class CommentController extends Controller
$reply = new Status(); $reply = new Status();
$reply->profile_id = $profile->id; $reply->profile_id = $profile->id;
$reply->caption = e(strip_tags($comment)); $reply->caption = e($comment);
$reply->rendered = $comment; $reply->rendered = $comment;
$reply->in_reply_to_id = $status->id; $reply->in_reply_to_id = $status->id;
$reply->in_reply_to_profile_id = $status->profile_id; $reply->in_reply_to_profile_id = $status->profile_id;
@ -44,7 +44,7 @@ class CommentController extends Controller
CommentPipeline::dispatch($status, $reply); CommentPipeline::dispatch($status, $reply);
if($request->ajax()) { if($request->ajax()) {
$response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url()]; $response = ['code' => 200, 'msg' => 'Comment saved', 'username' => $profile->username, 'url' => $reply->url(), 'profile' => $profile->url(), 'comment' => $reply->caption];
} else { } else {
$response = redirect($status->url()); $response = redirect($status->url());
} }

BIN
public/js/app.js vendored

Binary file not shown.

Binary file not shown.

View file

@ -11,7 +11,7 @@ $(document).ready(function() {
let el = $(this); let el = $(this);
let id = el.data('id'); let id = el.data('id');
let commentform = el.find('input[name="comment"]'); let commentform = el.find('input[name="comment"]');
let commenttext = $(commentform.val()).text(); let commenttext = commentform.val();
let item = {item: id, comment: commenttext}; let item = {item: id, comment: commenttext};
commentform.prop('disabled', true); commentform.prop('disabled', true);
@ -21,6 +21,7 @@ $(document).ready(function() {
var username = res.data.username; var username = res.data.username;
var permalink = res.data.url; var permalink = res.data.url;
var profile = res.data.profile; var profile = res.data.profile;
var reply = res.data.comment;
if($('.status-container').length == 1) { if($('.status-container').length == 1) {
var comments = el.parents().eq(3).find('.comments'); var comments = el.parents().eq(3).find('.comments');
@ -28,7 +29,7 @@ $(document).ready(function() {
var comments = el.parents().eq(1).find('.comments'); var comments = el.parents().eq(1).find('.comments');
} }
var comment = '<p class="mb-0"><span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="' + profile + '">' + username + '</a></bdi></span><span class="comment-text">'+ commenttext + '</span><span class="float-right"><a href="' + permalink + '" class="text-dark small font-weight-bold">1s</a></span></p>'; var comment = '<p class="mb-0"><span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="' + profile + '">' + username + '</a></bdi></span><span class="comment-text">'+ reply + '</span><span class="float-right"><a href="' + permalink + '" class="text-dark small font-weight-bold">1s</a></span></p>';
comments.prepend(comment); comments.prepend(comment);