Sha256: d75fcae8b5758c892f18b5c5e72aefce7443a11b68fa3ab14e00af6520d17d9e
Contents?: true
Size: 1.16 KB
Versions: 9
Compression:
Stored size: 1.16 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 %>); <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} %> ActiveScaffold.replace('<%= active_scaffold_calculations_id %>', '<%= escape_javascript(render(:partial => 'list_calculations')) %>'); <%end%> <% 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%> <% if ActiveScaffold.js_framework == :prototype %> ActiveScaffold.focus_first_element_of_form.defer('<%= element_form_id %>'); <% end %> <% else %> ActiveScaffold.find_action_link('<%element_form_id(:action => :new_existing)%>').close(); <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems