Sha256: 15908fb47a023ab2b7be7128d0ffbf789b9ce771790427da722ec7b333d1ec33

Contents?: true

Size: 1.14 KB

Versions: 99

Compression:

Stored size: 1.14 KB

Contents

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

if controller.send :successful?
  if @insert_row
    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}');"
  end

  if (active_scaffold_config.create.persistent)
    page << "$$(#{cancel_selector}).first().link.reload();"
  else
    page << "$$(#{cancel_selector}).first().link.close#{'_with_refresh' unless @insert_row}();"
  end
  if (active_scaffold_config.create.edit_after_create)
    page << "var link = $('#{action_link_id 'edit', @record.id}');"
    page << "if (link) (function() { link.action_link.open() }).defer();"
  end
else
  page << "l = $$(#{cancel_selector}).first().link;"
  page.replace element_form_id(:action => :create), :partial => 'create_form'
  page << "l.register_cancel_hooks();"
end
page.replace_html active_scaffold_messages_id, :partial => 'messages'

Version data entries

99 entries across 99 versions & 3 rubygems

Version Path
six-updater-web-0.24.15 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.14 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.13 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.12 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.11 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.10 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.9 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.8 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.7 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.6 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.5 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
brisk-bills-0.7.0 vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.4 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.3 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.2 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.1 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.24.0 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.23.7 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.23.6 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs
six-updater-web-0.23.5 lib/six-updater-web/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs