From aaf94d56ccf72c52d2ff21f777c5e23ab4125c52 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 3 Jun 2018 23:40:17 -0600 Subject: [PATCH] Fix comment timeline bug --- public/js/app.js | Bin 1106953 -> 1106936 bytes public/mix-manifest.json | Bin 184 -> 184 bytes resources/assets/js/components/commentform.js | 2 +- resources/assets/js/components/likebutton.js | 4 ++-- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index a7820a8a8c91a840606702bd7c8e98965de8ff91..e32bd8ddc659984d87cb81d0e6400b46089dd228 100644 GIT binary patch delta 91 zcmeA?;r!#cbHf%!mYt}zB6*P^ZaB4VkRJF24WTr wFA(!>=lRLs_Y7>r_C@yvEEt7UG)giui#7F95=#;_lrmG4G`HV=ARx;O0M8yRuK)l5 diff --git a/public/mix-manifest.json b/public/mix-manifest.json index c58ecdb81f8f82bfc42e8fe83215e03e22fd37d8..7b6dca63ce077e97e893a0ff4b18c02e52c38543 100644 GIT binary patch delta 30 lcmdnNxPx(mvWRh_K}wowvUyr!YO+~MT8f#WN%BPVMgWz%3DE!m delta 30 lcmdnNxPx(mvWQW#S+a$JWum!Znu&3;v2jX@Nzz2~MgWPm2@e1O diff --git a/resources/assets/js/components/commentform.js b/resources/assets/js/components/commentform.js index 159a9153..a0b56332 100644 --- a/resources/assets/js/components/commentform.js +++ b/resources/assets/js/components/commentform.js @@ -24,7 +24,7 @@ $(document).ready(function() { if($('.status-container').length == 1) { var comments = el.parents().eq(3).find('.comments'); } else { - var comments = el.parents().eq(2).find('.comments'); + var comments = el.parents().eq(1).find('.comments'); } var comment = '

' + username + ''+ commenttext + '1s

'; diff --git a/resources/assets/js/components/likebutton.js b/resources/assets/js/components/likebutton.js index 4283fcf1..1de310f7 100644 --- a/resources/assets/js/components/likebutton.js +++ b/resources/assets/js/components/likebutton.js @@ -35,7 +35,7 @@ $(document).ready(function() { .then(function (res) { var likes = ls.get('likes'); var action = false; - var counter = el.parents().eq(2).find('.like-count'); + var counter = el.parents().eq(1).find('.like-count'); var count = res.data.count; var heart = el.find('.status-heart'); @@ -54,7 +54,7 @@ $(document).ready(function() { } ls.set('likes', likes); - console.log(action + ' - ' + $(this).data('id') + ' like event'); + console.log(action + ' - ' + id + ' like event'); }); }); }); \ No newline at end of file