Sha256: e50cdd8a4a4995677b416aa006e5dc163bece5cee427242ccb990462368e2a85

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

<%# nested_id, allows us to remove a nested scaffold programmatically %>
<tr class="inline-adapter" id="<%= element_row_id action: :nested %>">
  <td class="inline-adapter-cell">
<% if successful? %>
    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{nested? ? nested.name : id_from_controller(params[:controller])}-view" %> view">
      <%= link_to(as_(:close), '', class: 'inline-adapter-close as_cancel', remote: true, title: as_(:close)) -%>
      <%= payload -%>
    </div>
<% end %>
    <%= javascript_tag do %>
      setTimeout(function() {
        var action_link = ActiveScaffold.ActionLink.get('<%= element_row_id(action: :nested) %>');
        if (action_link) {
          action_link.update_flash_messages('<%= escape_javascript(render('messages').strip) %>');
      <% unless successful? %>
          action_link.close();
          ActiveScaffold.scroll_to(action_link.scaffold(), ActiveScaffold.config.scroll_on_close == 'checkInViewport');
      <% end %>
        }
      }, 10);
    <% end %>
  </td>
</tr>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_scaffold-4.0.0.rc2 app/views/active_scaffold_overrides/_list_inline_adapter.html.erb
active_scaffold-4.0.0.rc1 app/views/active_scaffold_overrides/_list_inline_adapter.html.erb