Skip to content

Commit

Permalink
fix: disable comment button on post
Browse files Browse the repository at this point in the history
  • Loading branch information
walidmujahid committed Feb 28, 2020
1 parent 580861b commit 84931d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/assets/v2/js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ $(document).ready(function() {
var comment = $parent.parents('.box').find('.comment_container textarea').val();

$parent.parents('.box').find('.comment_container textarea').prop('disabled', true);
$('.post_comment').prop('disabled', true);

// validation
if (!comment) {
Expand Down Expand Up @@ -347,6 +348,7 @@ $(document).ready(function() {
.always(function() {
$parent.parents('.activity.box').find('.loading').addClass('hidden');
$parent.parents('.box').find('.comment_container textarea').prop('disabled', false);
$('.post_comment').prop('disabled', false);
});
};

Expand Down

0 comments on commit 84931d5

Please sign in to comment.