Sha256: c38887d6d45a3363709394c8eaba6b97ce3bed3a56d3665124e08b015a5f6ad5

Contents?: true

Size: 1023 Bytes

Versions: 2

Compression:

Stored size: 1023 Bytes

Contents

<% form_selector = "#{element_form_id(:action => :batch_create)}" %>

<% if controller.send :batch_successful? %>
  <% called_by_controller = params.delete(:batch_create_by) %>
  <% if called_by_controller.nil? %>
    ActiveScaffold.replace_html('<%= active_scaffold_content_id%>','<%=escape_javascript(render(:partial => 'list', :layout => false))%>');
  <% else %>
    <% options = {:checked => false,
               :include_mark_all => false} %>
    <% tbody_id = "#{controller_id(called_by_controller)}-tbody" %>
    ActiveScaffold.mark_records('<%=tbody_id%>', <%=options.to_json%>);
  <% end %>
  ActiveScaffold.find_action_link('<%=form_selector%>').close();
<% else %>
  ActiveScaffold.find_action_link('<%=form_selector%>').update_flash_messages('<%=escape_javascript(render(:partial => 'messages').strip)%>');
  ActiveScaffold.replace('<%=form_selector%>', '<%=escape_javascript(render(:partial => 'batch_create_form', :locals => {:xhr => true}))%>');
  ActiveScaffold.scroll_to('<%=form_selector%>');
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_scaffold_batch_vho-3.1.1 frontends/default/views/on_batch_create.js.erb
active_scaffold_batch_vho-3.1.0 frontends/default/views/on_batch_create.js.erb