Sha256: fb83ccd33e6fea4dabe28b946d3d81d806561a1c5b64daa4eac56b4e781242b8

Contents?: true

Size: 767 Bytes

Versions: 5

Compression:

Stored size: 767 Bytes

Contents

<% custom_field_id = "field_#{@field.id}";
   container_id = "#{@field.klass_name.downcase}_field_groups"
%>

<% if @field.errors.empty? %>
  jQuery('#<%=custom_field_id%>').replaceWith('<%= j (render :partial => "field", :collection => [@field]) %>')
  jQuery('#<%=custom_field_id%>').effect("highlight", { duration:1000 });
  jQuery('#<%=container_id%>').after('<%= j (sortable_element(container_id, :url => sort_admin_fields_path(:field_group_id => @field.field_group_id))) %>')
<% else %>
  jQuery('#<%=custom_field_id%>').find('.edit_field').replaceWith('<%= j(render :partial => "form") %>')
  jQuery('#<%=custom_field_id%>').effect("shake", { duration:250, distance: 6 });
  jQuery('#<%=custom_field_id%>').find('input[type="text"]').first().focus()
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 app/views/admin/fields/update.js.erb
fat_free_crm-0.12.2 app/views/admin/fields/update.js.erb
fat_free_crm-0.12.1 app/views/admin/fields/update.js.erb
fat_free_crm-0.12.0 app/views/admin/fields/update.js.erb
fat_free_crm-0.11.4 app/views/admin/fields/update.js.erb