diff --git a/app/models/ad_banner.rb b/app/models/ad_banner.rb index 368c7081..4fcfea9b 100644 --- a/app/models/ad_banner.rb +++ b/app/models/ad_banner.rb @@ -9,13 +9,15 @@ class AdBanner field :unpost_date,type: Date field :context field :direct_to_after_click,type: Boolean - field :ad_style #TODO Design should explain + field :ad_fx #TODO Design should explain before_save :save_or_destroy embeds_many :ad_images, :cascade_callbacks => true + FX_TYPES = ["blindX","blindY","blindZ","cover","curtainX","curtainY","fade","fadeZoom","growX","growY","scrollUp","scrollDown","scrollLeft","scrollRight","scrollHorz","scrollVert","shuffle","slideX","slideY","toss","turnUp","turnDown","turnLeft","turnRight","uncover","wipe","zoom"] + def new_ad_images=(*attrs) attrs[0].each do |attr| #Loop by JSs,Themes,Imgs unless attr[:file].nil? diff --git a/app/views/admin/ad_banners/_form.html.erb b/app/views/admin/ad_banners/_form.html.erb index ff19e513..ff522794 100644 --- a/app/views/admin/ad_banners/_form.html.erb +++ b/app/views/admin/ad_banners/_form.html.erb @@ -34,6 +34,10 @@ <%= f.label :direct_to_after_click, t('admin.direct_to_after_click') %> <%= f.check_box :direct_to_after_click %>
++ <%= f.label :ad_fx, t('admin.ad_fx') %> + <%= f.select :ad_fx ,AdBanner::FX_TYPES %> +
<%= f.label :ad_images, t('admin.ad_images') %>