Skip to content

Commit

Permalink
run ESLinit
Browse files Browse the repository at this point in the history
  • Loading branch information
fosterfarrell9 committed Dec 19, 2023
1 parent 5ffa192 commit 975b5cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/views/commontator/comments/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@
%>

<% if @commontator_new_comment.nil? %>
$("#<%= id %>").hide();
$("#<%= id %>").hide();

$("#<%= id %>-link").fadeIn();
$("#<%= id %>-link").fadeIn();
<% else %>
$("#<%= id %>").html("<%= escape_javascript(
$("#<%= id %>").html("<%= escape_javascript(
render partial: 'form', locals: {
comment: @commontator_new_comment, thread: @commontator_thread
}
) %>");
<% end %>

<% if @update_icon %>
$('#commentsIcon').addClass('new-comment');
$("#commentsIcon").addClass("new-comment");
<% end %>

<% if @no_unread_comments %>
$('#commentsIcon').removeClass('new-comment');
$("#commentsIcon").removeClass("new-comment");
<% end %>

var commontatorComment = $("#commontator-comment-<%= @comment.id %>").hide().fadeIn();
$('html, body').animate(
{ scrollTop: commontatorComment.offset().top - window.innerHeight/2 }, 'fast'
$("html, body").animate(
{ scrollTop: commontatorComment.offset().top - window.innerHeight / 2 }, "fast",
);

<%= javascript_proc %>

0 comments on commit 975b5cc

Please sign in to comment.