Closed victor-ono closed 13 years ago
That s possible yes.
Copy on_update.js.rjs to you controller view directory and change it as follows: form_selector = "#{element_form_id(:action => :update)}"
page << "ActiveScaffold.find_action_link('#{form_selector}').update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');" if controller.send :successful? page.call 'ActiveScaffold.replace', form_selector, render(:partial => 'update_form', :locals => {:xhr => true}) page.call 'ActiveScaffold.scroll_to', form_selector page.call 'ActiveScaffold.replace', active_scaffold_calculations_id, render(:partial => 'list_calculations') if active_scaffold_config.list.columns.any? {|c| c.calculation?} else page.call 'ActiveScaffold.replace', form_selector, render(:partial => 'update_form', :locals => {:xhr => true}) page.call 'ActiveScaffold.scroll_to', form_selector end
Is it possible to add a "Save and continue editing" button which would dynamically save the edits and refresh the form?