فهرست منبع

Fix comment timeline bug

Daniel Supernault 7 سال پیش
والد
کامیت
aaf94d56cc

BIN
public/js/app.js


BIN
public/mix-manifest.json


+ 1 - 1
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 = '<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>';

+ 2 - 2
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');
     });
   });
 });