Migrate assets to use Webpacker

This commit is contained in:
Albert Yi
2018-07-06 16:41:08 -07:00
parent 95b72f5f5c
commit 6fa0ae2cf1
175 changed files with 11518 additions and 3726 deletions

View File

@@ -1,7 +1,7 @@
<% if @forum_post_vote.invalid? %>
Danbooru.error(<%= raw @forum_post_vote.errors.full_messages.join("; ").to_json %>);
$(window).trigger("danbooru:error", <%= raw @forum_post_vote.errors.full_messages.join("; ").to_json %>);
<% else %>
Danbooru.notice("Voted");
$(window).trigger("danbooru:notice", "Voted");
var code = <%= raw render(partial: "forum_post_votes/list", locals: {forum_post: @forum_post, votes: @forum_post.votes}).to_json %>;
$("#forum-post-votes-for-<%= @forum_post.id %>").html(code);
<% end %>

View File

@@ -1,3 +1,3 @@
Danbooru.notice("Unvoted");
$(window).trigger("danbooru:notice", "Unvoted");
var code = <%= raw render(partial: "forum_post_votes/list", locals: {forum_post: @forum_post, votes: @forum_post.votes}).to_json %>;
$("#forum-post-votes-for-<%= @forum_post.id %>").html(code);