<%# This chunk is just a copy of Spree's backend/app/views/spree/admin/products/new.js.erb %>
$("#new_product").html('<%= escape_javascript(render :template => "spree/admin/products/new", :formats => [:html], :handlers => [:haml]) %>');
handle_date_picker_fields();
<% unless Rails.env.test? %>
  $('.select2').select2();
<% end %>
$("#table-filter").hide();
$("#admin_new_product").parent().hide();

<%# We need to replace the page's title as well. We're navigating to a new page
  although through ajax %>
$('#content-header .page-title').html('<%= t('.title') %>');
