Sha256: 8cb2d2bcfa5d435910248be3032c42e9ddacfb473fb45a61b5eaa18d7b08d5c8

Contents?: true

Size: 1.08 KB

Versions: 36

Compression:

Stored size: 1.08 KB

Contents

new_row = render :partial => 'list_record', :locals => {:record => @record}
page << "ActiveScaffold.create_record_row('#{active_scaffold_id}','#{escape_javascript(new_row)}', #{{:insert_at => :top}.to_json});"
page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?}

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.
  page.call 'ActiveScaffold.reset_form', element_form_id
  page.call 'ActiveScaffold.replace_html', element_messages_id(:action => :add_existing), 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
    page.delay 0.1 do
      page << "ActiveScaffold.focus_first_element_of_form('#{element_form_id}');"
    end
  end
else
  page << "ActiveScaffold.find_action_link('#{element_form_id(:action => :new_existing)}').close();"
end

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
active_scaffold_vho-3.0.31 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.30 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.29 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.28 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.27 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.26 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.25 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.26 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.25 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.24 frontends/default/views/add_existing.js.rjs
active_scaffold_clarity-3.0.24.2 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.23 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.22 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.24 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.21 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.23 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.22 frontends/default/views/add_existing.js.rjs
active_scaffold-3.0.21 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.20 frontends/default/views/add_existing.js.rjs
active_scaffold_vho-3.0.19 frontends/default/views/add_existing.js.rjs