<% if params[:flash] %>
  flash("<%= t("flash.admin.actions.#{action_name}.notice", resource_name: resource_class.model_name.human(count: 1)) %>")
<% end %>


<% unless params[:modal] %>
  <%
    form_wrap_id = dom_id(resource, 'list_edit')
    html = render('table', collection: [resource]).match(/<tbody>(.*)<\/tbody>/m)[1].html_safe
  %>
  $('#<%= form_wrap_id %>').remove();
  $('#<%= dom_id(resource, 'list') %>').replaceWith('<%= j html %>');
  var $el = $('#<%= dom_id(resource, 'list') %>');
  $(document).trigger('admin:list_init');
  if (!$el[0].className) $el.addClass('success');
  $el.scrollToEl();
<% end %>

window.ab_admin_last_updated = <%= raw resource.for_input_token.to_json %>;
<% if params[:flash] %>
  flash("<%= t("flash.admin.actions.#{action_name}.notice", resource_name: resource_class.model_name.human(count: 1)) %>")
<% end %>


<% unless params[:modal] %>
  <%
    form_wrap_id = dom_id(resource, 'list_edit')
    html = render('table', collection: [resource]).match(/<tbody>(.*)<\/tbody>/m)[1].html_safe
  %>
  $('#<%= form_wrap_id %>').remove();
  $('#<%= dom_id(resource, 'list') %>').replaceWith('<%= j html %>');
  var $el = $('#<%= dom_id(resource, 'list') %>');
  $(document).trigger('admin:list_init');
  if (!$el[0].className) $el.addClass('success');
//  $el.scrollToEl();
<% end %>

window.ab_admin_last_updated = <%= raw resource.for_input_token.to_json %>;
Disable scroll to record in list edit mode
Disable scroll to record in list edit mode
