Sha256: 5f1f6ea94d3d90775b498329baccfb428e7e1844aa2bedd3685f6d69ad46efbe
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
if @opportunity.valid? page[:create_opportunity_arrow].replace_html "►" page[:create_opportunity_title].replace_html t(:opportunities) page.visual_effect :toggle_blind, :create_opportunity, :duration => 0.3, :afterFinish => 'function(effect) {effect.element.update("")}' page.insert_html :top, :opportunities, :partial => "opportunity", :collection => [ @opportunity ] page[dom_id(@opportunity)].visual_effect :highlight, :duration => 1.5 if called_from_index_page? page << refresh_sidebar(:index, :filters) page[:paginate].replace_html :partial => "shared/paginate_with_per_page" elsif called_from_landing_page?("accounts") # Opportunity created on Account landing page: refresh Account summary. @account.reload page << refresh_sidebar_for(:accounts, :show, :summary) elsif called_from_landing_page?("campaigns") # Opportunity created on Campaign landing page: refresh Campaign summary. @campaign.reload page << refresh_sidebar_for(:campaigns, :show, :summary) else # Opportunity created on Contact landing page: refresh recent items list. page[:recently].replace :partial => "shared/recently" end page.call "crm.flick", :empty, :remove else page[:create_opportunity].replace_html :partial => "new" page.call "crm.create_or_select_account", request.referer =~ /\/accounts\// || @account.id.blank? hook(:new_opportunity_rjs, self, :page => page) page[:create_opportunity].visual_effect :shake, :duration => 0.25, :distance => 6 page[:opportunity_name].focus end
Version data entries
5 entries across 5 versions & 1 rubygems