Overriding the broken _destroy partial so failure to destroy is shown as intended

This commit is contained in:
Will Marshall
2013-11-29 12:32:39 +11:00
parent 6608b6e1ad
commit 0cfc0efe32

View File

@@ -0,0 +1,17 @@
notice_div = $('.flash.notice');
<% notice = flash.discard(:notice)
if notice %>
if (notice_div.length > 0) {
notice_div.html("<%= notice %>");
notice_div.show();
} else {
if ($("#content .toolbar").length > 0) {
$("#content .toolbar").before('<div class="flash notice"><%= notice %></div>');
} else {
$("#progress").before('<div class="flash notice"><%= notice %></div>');
}
} <%
end %>
<%= render :partial => '/spree/admin/shared/update_order_state' if @order %>