Sha256: fc7a3179e85d089911436b80843c6a01a7e65713d614e38fd886d0d627619733

Contents?: true

Size: 1 KB

Versions: 98

Compression:

Stored size: 1 KB

Contents

<% new_row = render :partial => 'list_record', :locals => {:record => @record} %>
ActiveScaffold.create_record_row('<%= active_scaffold_id %>', '<%= escape_javascript(new_row) %>', <%= {:insert_at => :top}.to_json.html_safe %>);

<%= render :partial => 'update_calculations', :formats => [:js] %>

<% if form_stays_open ||= true %>
  <%# why not just re-render the form? that wouldn't utilize a possible do_new override which sets default values.%>
  ActiveScaffold.reset_form('<%= element_form_id %>');
  ActiveScaffold.replace_html('<%= element_messages_id(:action => :add_existing) %>', '<%= escape_javascript(render(:partial => 'form_messages')) %>');
  <%# have to delay the focus, because there's no "firstElement" in prototype until at least one element is not disabled%>
  ActiveScaffold.focus_first_element_of_form<%= '.defer' if ActiveScaffold.js_framework == :prototype %>('<%= element_form_id %>');
<% else %>
  ActiveScaffold.find_action_link('<%= element_form_id(:action => :new_existing) %>').close();
<% end %>

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
active_scaffold-3.7.10 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.8 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.7 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.6 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.5 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.2 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.1 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.7.0 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.20 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.19 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.17 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.15 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.14 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.13 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.12 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.11.1 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.11 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.10 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.9 app/views/active_scaffold_overrides/add_existing.js.erb
active_scaffold-3.6.8 app/views/active_scaffold_overrides/add_existing.js.erb