diff --git a/app/assets/javascripts/comment.js b/app/assets/javascripts/comment.js index da5dc92abf..039b5af104 100644 --- a/app/assets/javascripts/comment.js +++ b/app/assets/javascripts/comment.js @@ -1,5 +1,4 @@ -(function() { - +$(function() { $('.comment-form').each(function() { if(!$(this).hasClass('bound-success')) { $(this).addClass('bound-success').on('ajax:success', function(e, data, status, xhr){ @@ -46,7 +45,7 @@ } }); -}()); +}); function insertTitleSuggestionTemplate() { var element = $('#text-input'); diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 886d12d68d..3e949f50a3 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -103,11 +103,8 @@ $E.refresh(); } - - <%= javascript_include_tag "dragdrop" %> - <%= javascript_include_tag "comment.js" %>
<%= comments.size %> <%= translation('notes._comments.comments') %>
- + <%= javascript_include_tag "dragdrop" %> + <%= javascript_include_tag "comment" %><%= comments.size %> Comments