Sha256: 5302cf30466361c02d5cdb14d33749fc4e60c2f43901d4faaece4b61154f81e6
Contents?: true
Size: 1.05 KB
Versions: 18
Compression:
Stored size: 1.05 KB
Contents
- entity_name = controller.controller_name.singularize.underscore #account - @entity = instance_variable_get("@#{entity_name}") - id = called_from_landing_page? ? "edit_#{entity_name}" : dom_id(@entity) - if @entity.errors.empty? - if called_from_landing_page? crm.flip_form('edit_#{entity_name}'); crm.set_title('edit_#{entity_name}', '#{h @entity.full_name}'); = refresh_sidebar(:show, :summary) - else $('##{id}').replaceWith('#{ j render(:partial => entity_name, :collection => [ @entity ]) }'); $('##{id}').effect("highlight", { duration:1500 }); - if called_from_index_page? = refresh_sidebar(:index) - else $('#recently').replaceWith('#{ j render(:partial => "shared/recently") }'); - else $('##{id}').html('#{ j render(:partial => "edit") }'); crm.create_or_select_account(#{ request.referer =~ /\/accounts\// || @account.id.blank? }); $('##{id}').effect("shake", { duration:250, distance: 6 }); $('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus(); = hook(:entity_update, self, {entity: @entity})
Version data entries
18 entries across 18 versions & 2 rubygems