Sha256: 81ef52d675dc40e8795be86e8e73536708b9d27bafa541d903ef70fd0b673000

Contents?: true

Size: 843 Bytes

Versions: 8

Compression:

Stored size: 843 Bytes

Contents

<% rtc_controller_name = params[:rtc_controller_name].presence || controller_name %>
<% controller_name_singular = rtc_controller_name.singularize %>
<% @controller_name = instance_variable_get("@#{controller_name_singular}") %>

var $new_item = $('<%= j(render :partial => params[:rtc_partial].presence || controller_name_singular, locals: {"#{controller_name_singular}".to_sym => @controller_name}) %>').st_formatRow().addClass('created');

var $rtc = $('.rich_table_component.showing_new_form');
$rtc.removeClass('showing_new_form');
$rtc.find('.resizers').after($new_item);

$rtc.find('.showing_new_form').removeClass('showing_new_form');
$rtc.find('.lvr_entry_edited').removeClass('lvr_entry_edited');
$rtc.find('.rtc_empty_message').remove();

$('.modal').modal('hide');


<% flash[:error].try(:clear) %>
<% flash[:notice].try(:clear) %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rich_table_component-0.0.9 app/views/application/create.js.erb
rich_table_component-0.0.8 app/views/application/create.js.erb
rich_table_component-0.0.7 app/views/application/create.js.erb
rich_table_component-0.0.6 app/views/application/create.js.erb
rich_table_component-0.0.5 app/views/application/create.js.erb
rich_table_component-0.0.4 app/views/application/create.js.erb
rich_table_component-0.0.3 app/views/application/create.js.erb
rich_table_component-0.0.2 app/views/application/create.js.erb