From 7a1b0f2f27e2858bf431bc288ec6ee2bb9e97966 Mon Sep 17 00:00:00 2001 From: Will Gutierrez Date: Mon, 18 Jan 2021 23:35:55 -0800 Subject: [PATCH] move dragdrop.js & comment.js to notes/comments partial #9004 --- app/views/notes/_comments.html.erb | 3 ++- app/views/notes/show.html.erb | 2 -- app/views/wiki/show.html.erb | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/views/notes/_comments.html.erb b/app/views/notes/_comments.html.erb index 38a520eefd..985a6c14d0 100644 --- a/app/views/notes/_comments.html.erb +++ b/app/views/notes/_comments.html.erb @@ -2,7 +2,8 @@
<% comments = @node.comments_viewable_by(current_user) %>

<%= comments.size %> <%= translation('notes._comments.comments') %>

- + <%= javascript_include_tag "dragdrop" %> + <%= javascript_include_tag "comment" %>
<% comments.includes([:replied_comments, :node]).order('timestamp ASC').each do |comment| %> <% if comment.cid == @node.comments&.first&.cid %><% end %> diff --git a/app/views/notes/show.html.erb b/app/views/notes/show.html.erb index d4fa4efebd..c9e08dc04c 100644 --- a/app/views/notes/show.html.erb +++ b/app/views/notes/show.html.erb @@ -117,8 +117,6 @@
<% end %> <% if !@preview %> - <%= javascript_include_tag "dragdrop" %> - <%= javascript_include_tag "comment" %> <%= render partial: "notes/responses" %>
<%= render partial: "notes/comments" %>
<% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 2d7a0377f6..2ddc8a1bec 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -32,8 +32,6 @@
<% if controller.action_name == 'comments' %> - <%= javascript_include_tag "dragdrop" %> - <%= javascript_include_tag "comment" %> <%= render partial: "notes/comments", :locals => {:nodes => @nodes} %> <% else %>
style="max-width:800px;"<% end %> id="content" class="pl-content wiki">