effects working and also the widht and height
This commit is contained in:
parent
6a2525bd65
commit
f58512ec35
|
@ -8,9 +8,6 @@ function slideshow (element, bannerEffect, bannerTime, bannerSpeed) {
|
|||
});
|
||||
};
|
||||
function setSlideshow(element, data) {
|
||||
$("#pageslide .ad_banner_ad_fx").children('option:selected').each(function(index, el) {
|
||||
$(this).val() == 'flipHorz' || $(this).val() == 'flipVert' ? $('.suckIE').show() : $('.suckIE').hide();
|
||||
});
|
||||
slideshow(element, data['fx'], 2000, 1000);
|
||||
}
|
||||
|
||||
|
@ -72,9 +69,6 @@ $(function() {
|
|||
|
||||
bannerTime = parseInt(bannerTime) || 300;
|
||||
bannerSpeed = parseInt(bannerSpeed) || 300;
|
||||
$(this).children('option:selected').each(function(index, el) {
|
||||
$(this).val() == 'flipHorz' || $(this).val() == 'flipVert' ? $('.suckIE').show() : $('.suckIE').hide();
|
||||
});
|
||||
slideshow($preview, $(this).val(), 2000, 1000);
|
||||
});
|
||||
preview();
|
||||
|
|
|
@ -32,6 +32,8 @@ class AdBannersController < ApplicationController
|
|||
"ad_fx" => adbanner.ad_fx,
|
||||
"speed" => adbanner.speed,
|
||||
"title" => adbanner.title,
|
||||
"height" => adbanner.height,
|
||||
"width" => adbanner.width,
|
||||
"timeout" => (adbanner.timeout * 1000),
|
||||
"more" => "More"
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@ class Banner
|
|||
validates :title, :length => { :minimum => 2 }
|
||||
validates :height, :speed, :timeout, :width, :presence => true
|
||||
|
||||
FX_TYPES = %w(fade fadeout flipHorz flipVert scrollHorz scrollVert tileSlide tileBlind)
|
||||
FX_TYPES = %w(fade scrollHorz scrollVert tileSlide tileBlind)
|
||||
|
||||
def size
|
||||
"#{self.width} x #{self.height}"
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
<%= f.label :size, t('ad_banner.size') %>
|
||||
<span class="banner_set">W:</span>
|
||||
<%= f.number_field :width, in: 10..1000, step: 10, class: 'input-mini', onkeypress: "if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;", id: 'width' %>
|
||||
<%= f.number_field :width, in: 10..3000, class: 'input-mini', onkeypress: "if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;", id: 'width' %>
|
||||
<span class="banner_set">H:</span>
|
||||
<%= f.number_field :height, in: 10..1000, step: 10, class: 'input-mini', onkeypress: "if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;", id: 'height' %>
|
||||
<%= f.number_field :height, in: 10..3000, class: 'input-mini', onkeypress: "if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;", id: 'height' %>
|
||||
|
||||
<%= f.label :category_id, t('ad_banner.categories') %>
|
||||
<%= f.select :category_id, @categories, {} %>
|
||||
|
|
Loading…
Reference in New Issue