Sha256: e739853e73745b4772d626c8f05eb46193a43a502329944d72d5b9e4dbd0f467

Contents?: true

Size: 1.62 KB

Versions: 10

Compression:

Stored size: 1.62 KB

Contents

<% @column_span_id ||= element_cell_id(:id => @record.id.to_s, :action => 'update_column', :name => @column.name) -%>
<% unless controller.send :successful? -%>
  alert('<%= escape_javascript(@record.errors.full_messages.join("\n")) %>');
  <% @record.reload -%>
<% end -%>
<% if @column.inplace_edit
     ipe_update = @column.inplace_edit_update if controller.send :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

10 entries across 10 versions & 1 rubygems

Version Path
active_scaffold-3.4.1 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.4.0.1 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.4.0 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.3 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.2 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.1 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.0 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.0.rc3 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.0.rc2 app/views/active_scaffold_overrides/update_column.js.erb
active_scaffold-3.3.0.rc app/views/active_scaffold_overrides/update_column.js.erb