Sha256: 39766fc6419bb2cd1c1e1a3e8c60acb3038f3f26f67c396a56924efb48ab8822

Contents?: true

Size: 722 Bytes

Versions: 7

Compression:

Stored size: 722 Bytes

Contents

<% if params[:modal] %>
  var $form = $('#modal_form');
  $form.html("<%= j render 'modal_form_layout' %>");
  $form.find('form').trigger('admin:form_init');
<% else %>
  <%
    el_id = dom_id(resource, 'list')
    form_wrap_id = dom_id(resource, 'list_edit')
    html = %[<tr id="#{form_wrap_id}" class="list_edit warning"><td>#{render('form')}</td></tr>].html_safe
  %>
  $('#<%= form_wrap_id %>').remove();
  $('#<%= el_id %>').after('<%= j html %>');
  $('#<%= form_wrap_id %> td:first').attr('colspan', $('#<%= form_wrap_id %>').prev('tr').find('> td').length);
  $('#<%= form_wrap_id %> form').trigger('admin:form_init');
  $('#<%= el_id %>').scrollToEl();
<% end %>

<%= render 'admin/shared/flash', flash: flash %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.9.0 app/views/admin/base/edit.js.erb
ab_admin-0.8.3 app/views/admin/base/edit.js.erb
ab_admin-0.8.2 app/views/admin/base/edit.js.erb
ab_admin-0.8.1 app/views/admin/base/edit.js.erb
ab_admin-0.8.0 app/views/admin/base/edit.js.erb
ab_admin-0.7.0 app/views/admin/base/edit.js.erb
ab_admin-0.6.1 app/views/admin/base/edit.js.erb