Sha256: 7dedeb1c12b70f4920529ebc3bf528bc2deb4bf6f2067e0e38e2dcc4575b1839

Contents?: true

Size: 968 Bytes

Versions: 2

Compression:

Stored size: 968 Bytes

Contents

cancel_selector = "##{element_form_id(:action => :create)} a.cancel".to_json

if controller.send :successful?
  page.insert_html :top, active_scaffold_tbody_id, :partial => 'list_record', :locals => {:record => @record}
  page << "ActiveScaffold.stripe($('#{active_scaffold_tbody_id}'))"
  page << "ActiveScaffold.hide_empty_message('#{active_scaffold_tbody_id}','#{empty_message_id}');"
  page << "ActiveScaffold.increment_record_count('#{active_scaffold_id}');"
  page.replace active_scaffold_calculations_id, :partial => 'list_calculations' if active_scaffold_config.list.columns.any? {|c| c.calculation?}

  if (active_scaffold_config.create.persistent)
    page << "$$(#{cancel_selector}).first().link.reload();"
  else
    page << "$$(#{cancel_selector}).first().link.close();"
  end
else
  page << "l = $$(#{cancel_selector}).first().link;"
  page.replace element_form_id(:action => :create), :partial => 'create_form'
  page << "l.register_cancel_hooks();"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
antfarm-0.3.0 rails/vendor/plugins/active_scaffold/frontends/default/views/create.rjs
antfarm-0.4.0 rails/vendor/plugins/active_scaffold/frontends/default/views/create.rjs