Sha256: ecbe4f1f005ea747aed67299cdf76932826481cea782ea05f89391c461efd334

Contents?: true

Size: 1.54 KB

Versions: 6

Compression:

Stored size: 1.54 KB

Contents

<% @column_span_id ||= element_cell_id(:id => @record.id.to_s, :action => 'update_column', :name => @column.name) -%>
<% unless successful? -%>
  <%= render 'update_messages' %>
  <% @record.reload -%>
<% end -%>
<% if @column.inplace_edit
     ipe_update = @column.inplace_edit_update if successful? -%>
  <% case ipe_update
     when :row -%>
       ActiveScaffold.update_row('<%= element_row_id(:action => :list) %>', '<%= escape_javascript render('row', :record => @record) %>');
  <% when :table -%>
       ActiveScaffold.replace_html('<%= active_scaffold_content_id %>', '<%= escape_javascript(render('list')) %>');
  <% else
       formatted_value = get_column_value(@record, @column) -%>
       ActiveScaffold.update_inplace_edit('<%= @column_span_id %>','<%= escape_javascript(formatted_value) %>', <%= column_empty?(formatted_value).to_json %>);
    <% if ipe_update == :columns && @column.update_columns && !@column.update_columns.empty?
         @rendered = Set.new([@column.name]) -%>
         <%= render :partial => 'update_column', :collection => @column.update_columns & active_scaffold_config.list.columns.names, :locals => {:row_id => element_row_id(:action => :list, :id => @record.id)} %>
    <% end %>
  <% end -%>
<% else -%>
  ActiveScaffold.replace_html('<%= @column_span_id %>','<%= escape_javascript(get_column_value(@record, @column)) %>');
<% end -%>
<% if @column.calculation? -%>
  ActiveScaffold.replace_html('<%= active_scaffold_calculations_id(:column => @column) %>', '<%= escape_javascript(render_column_calculation(@column)) %>');
<% end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
active_scaffold-3.5.5 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.5.4 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.5.3 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.5.2 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.5.1 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.5.0 app/views/active_scaffold_overrides/update_column.js.erb