Sha256: f9fe6e039230c91e2a1fdfff19f19b501d7d200b1810e2b5dcaa3af762eabde1
Contents?: true
Size: 1.03 KB
Versions: 19
Compression:
Stored size: 1.03 KB
Contents
- entity_name = controller.controller_name.singularize.underscore #account - @entity = instance_variable_get("@#{entity_name}") - create_id = "create_#{entity_name}" # create_account - if @entity.valid? $('##{create_id}_arrow').html(crm.COLLAPSED); $('##{create_id}_title').html('#{ j t(entity_name.pluralize) }'); $('##{create_id}').slideUp(250); $('##{entity_name.pluralize}').prepend('#{ j render(:partial => entity_name, :collection => [ @entity ]) }'); $('##{dom_id(@entity)}').effect("highlight", { duration:1500 }); - if called_from_index_page? = refresh_sidebar(:index, :filters) $('#paginate').html('#{ j render(:partial => "shared/paginate_with_per_page") }'); - elsif called_from_landing_page?("campaigns") - @campaign.reload = refresh_sidebar_for(:campaigns, :show, :summary) crm.flick('empty', 'remove'); - else $('##{create_id}').html('#{ j render(:partial => "new") }'); $('##{create_id}').effect("shake", { duration:250, distance: 6 }); $('#new_#{entity_name} input[type!=hidden]').first().focus();
Version data entries
19 entries across 19 versions & 2 rubygems