Sha256: d6575f4db672a6b6fb588c5d2bd5f7463c566ec0437ab4ccc2b17381bad319ed

Contents?: true

Size: 1.64 KB

Versions: 30

Compression:

Stored size: 1.64 KB

Contents

var link;
<% if @action_link&.position %>
link = ActiveScaffold.find_action_link('<%= element_form_id(:action => action_name) %>');
<% end %>
<% if successful? %>
  <% if @record %>
    <%= render :partial => 'update_messages' %>
    <% row = escape_javascript(render(:partial => 'list_record', :locals => {:record => @record})) -%>
    <% if @action_link&.position %>
if (link) link.close('<%= row %>');
    <% else %>
      ActiveScaffold.update_row('<%= element_row_id(:action => :list, :id => @record.id) %>', '<%= row %>');
      ActiveScaffold.scroll_to('<%= element_row_id(:action => :list, :id => @record.id) %>', true);
    <% end %>
    <%= render :partial => 'update_calculations', :formats => [:js] %>
  <% else %>
    <% if @action_link&.position %>
if (link) link.close();
    <% end %>
    <%= render 'refresh_list', no_history: true %>
  <% end %>
<% else %>
  <% flash[:error] = active_scaffold_error_messages_for(@record, :object_name => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :header_message => '', :message => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :container_tag => nil, :list_type => :br) if @record&.errors.present? %>
  <% messages = escape_javascript(render(:partial => 'messages')) %>
  <% if @action_link&.position %>
if (link) {
  link.update_flash_messages('<%= messages %>');
  ActiveScaffold.enable_form(link.adapter.find('form'));
}
  <% else %>
  ActiveScaffold.replace_html('<%= active_scaffold_messages_id %>', '<%= messages %>');
  ActiveScaffold.scroll_to('<%= active_scaffold_messages_id %>', true);
  <% end %>
<% end %>

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
active_scaffold-3.7.8 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.7 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.6 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.5 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.2 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.1 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.7.0 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.20 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.19 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.17 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.15 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.14 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.13 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.12 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.11.1 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.11 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.10 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.9 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.8 app/views/active_scaffold_overrides/on_action_update.js.erb
active_scaffold-3.6.6 app/views/active_scaffold_overrides/on_action_update.js.erb