Fix for banner on ie
This commit is contained in:
1 parent
c2f3f45196
commit
18e18a4add
3 files changed
+27
-11
No files matched your search
@@ -44,17 +44,23 @@ module ParserCommon
|
||||
ad_banner = AdBanner.find(banner["id"]) rescue nil
|
||||
if ad_banner
|
||||
res << "<script type='text/javascript'>
|
||||
$(document).ready(function(){
|
||||
$('#slideshow-#{ad_banner.title.dehumanize}').cycle({
|
||||
delay: -1000,
|
||||
fx: '#{ad_banner.ad_fx.nil? ? 'fade': ad_banner.ad_fx}',
|
||||
timeoutFn: getTimeout,
|
||||
pager: '#banner_nav',
|
||||
pagerAnchorBuilder: function(idx, slide) {
|
||||
return \"<li><a href='#'></a></li>\";
|
||||
}
|
||||
jQuery(function( $ ){
|
||||
$.preload( '#slideshow-#{ad_banner.title.dehumanize} img', {
|
||||
onFinish:finish,
|
||||
threshold: 2 //'2' is the default, how many at a time, to load.
|
||||
});
|
||||
function finish(){
|
||||
$('#slideshow-#{ad_banner.title.dehumanize}').cycle({
|
||||
delay: -1000,
|
||||
fx: '#{ad_banner.ad_fx.nil? ? 'fade': ad_banner.ad_fx}',
|
||||
timeoutFn: getTimeout,
|
||||
pager: '#banner_nav',
|
||||
pagerAnchorBuilder: function(idx, slide) {
|
||||
return \"<li><a href='#'></a></li>\";
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>"
|
||||
res << "<ul id='banner_nav' class='clear'></ul>"
|
||||
res << "<div id='slideshow-#{ad_banner.title.dehumanize}' class='slideshow'>"
|
||||
@@ -74,7 +80,7 @@ module ParserCommon
|
||||
res << "link_open='#{ad_image.link_open}' "
|
||||
# res << "link_url='#{(ad_image.direct_to_after_click?? ad_image.out_link : ad_banner.context) || ' '}' "
|
||||
res << "link_url='#{(ad_image.out_link)}' "
|
||||
res << "style='cursor:pointer'" if !ad_image.out_link.blank?
|
||||
res << "style='cursor:pointer; visibility='hidden'" if !ad_image.out_link.blank?
|
||||
res << "/>"
|
||||
end
|
||||
res << "</div>"
|
||||
|
||||
Reference in new issue
Block a user