Skip to content

Commit

Permalink
move comment.js & dragdrop.js to higher-level views publiclab#9004
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Jan 19, 2021
1 parent f0be879 commit dbdf14b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 0 additions & 3 deletions app/views/comments/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,8 @@
$E.refresh();
}
</script>

<%= javascript_include_tag "dragdrop" %>
<script src="/emoji.js" type="text/javascript"></script>
<script src="/assets/atwho_autocomplete.js" type="text/javascript"></script>
<%= javascript_include_tag "comment.js" %>

<div class="control-group">
<button type="submit" class="btn btn-primary"><%= translation('comments._form.publish') %></button>
Expand Down
2 changes: 2 additions & 0 deletions app/views/notes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
<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: 2 additions & 0 deletions app/views/questions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
<% comments = @node.comments_viewable_by(current_user) %>
<h3><span id="comment-count"><%= comments.size %></span> Comments</h3>
<div id="comments-list">
<%= javascript_include_tag "dragdrop" %>
<%= javascript_include_tag "comment" %>
<% comments.includes([:node, :replied_comments]).order("timestamp ASC").each do |comment| %>
<% if comment.reply_to.nil? %>
<%= render :partial => "notes/comment", :locals => {:comment => comment} %>
Expand Down
4 changes: 3 additions & 1 deletion app/views/wiki/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

<div class="tab-pane active" id="tab-overview">
<% if controller.action_name == 'comments' %>
<%= render partial: "notes/comments", :locals => {:nodes => @nodes} %>
<%= 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">
<% if @node.has_tag('format:raw') %>
Expand Down

0 comments on commit dbdf14b

Please sign in to comment.