Skip to content

Commit

Permalink
move dragdrop.js & comment.js to notes/comments partial publiclab#9004
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Jan 19, 2021
1 parent b8402a0 commit 7a1b0f2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/views/notes/_comments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<div id="comments" class="col-lg-10 comments">
<% comments = @node.comments_viewable_by(current_user) %>
<h3><span id="comment-count"><%= comments.size %></span> <%= translation('notes._comments.comments') %></h3>

<%= javascript_include_tag "dragdrop" %>
<%= javascript_include_tag "comment" %>
<div style="margin-bottom: 50px;" id="comments-list">
<% comments.includes([:replied_comments, :node]).order('timestamp ASC').each do |comment| %>
<% if comment.cid == @node.comments&.first&.cid %><a id="last" name="last"></a><% end %>
Expand Down
2 changes: 0 additions & 2 deletions app/views/notes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@
<hr />
<% end %>
<% if !@preview %>
<%= javascript_include_tag "dragdrop" %>
<%= javascript_include_tag "comment" %>
<%= render partial: "notes/responses" %>
<div><%= render partial: "notes/comments" %></div>
<% end %>
Expand Down
2 changes: 0 additions & 2 deletions app/views/wiki/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

<div class="tab-pane active" id="tab-overview">
<% if controller.action_name == 'comments' %>
<%= javascript_include_tag "dragdrop" %>
<%= javascript_include_tag "comment" %>
<%= render partial: "notes/comments", :locals => {:nodes => @nodes} %>
<% else %>
<div <% unless @node.has_tag('style:wide') %>style="max-width:800px;"<% end %> id="content" class="pl-content wiki">
Expand Down

0 comments on commit 7a1b0f2

Please sign in to comment.