Sha256: 55442751ce09ea71619fcb3eb6637ab5e2f1d3045b39d6669417445b20823633

Contents?: true

Size: 743 Bytes

Versions: 5

Compression:

Stored size: 743 Bytes

Contents

id = called_from_landing_page? ? "edit_campaign" : dom_id(@campaign)

if @campaign.errors.empty?
  if called_from_landing_page?
    page.call "crm.flip_form", :edit_campaign
    page.call "crm.set_title", :edit_campaign, @campaign.name
    page << refresh_sidebar(:show, :summary)
  else
    page[id].replace :partial => "campaign", :collection => [ @campaign ]
    page[id].visual_effect :highlight, :duration => 1.0
    page << refresh_sidebar(:index, :filters)
  end
else
  page[id].replace_html :partial => "edit"
  page[id].visual_effect :shake, :duration => 0.25, :distance => 6
  if @campaign.errors[:name].blank? and @campaign.errors[:ends_on].present?
    page[:campaign_ends_on].focus
  else
    page[:campaign_name].focus
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 app/views/campaigns/update.js.rjs
fat_free_crm-0.12.2 app/views/campaigns/update.js.rjs
fat_free_crm-0.12.1 app/views/campaigns/update.js.rjs
fat_free_crm-0.12.0 app/views/campaigns/update.js.rjs
fat_free_crm-0.11.4 app/views/campaigns/update.js.rjs