diff --git a/app/views/commontator/comments/create.js.erb b/app/views/commontator/comments/create.js.erb index 83806b8f8..12e396cb5 100644 --- a/app/views/commontator/comments/create.js.erb +++ b/app/views/commontator/comments/create.js.erb @@ -18,11 +18,11 @@ %> <% 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 } @@ -30,16 +30,16 @@ <% 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 %>