Fix bug.
This commit is contained in:
parent
e48b43937c
commit
71917f80ae
|
@ -88,7 +88,7 @@ class AdBannersController < ApplicationController
|
|||
alt_title = (ad_b.title.blank? ? "ad-banner image" : ad_b.title)
|
||||
if ad_b.exchange_item == "1"
|
||||
image_html = "<div class=\"w-ad-banner__slide w-ba-banner__slide #{klass}\"
|
||||
data-link=\"#{ad_b.out_link || "#"}'\"
|
||||
data-link=\"#{ad_b.out_link || "#"}\"
|
||||
data-cycle-title=\"#{ad_b.title}\"
|
||||
data-cycle-desc=\"#{context}\"
|
||||
data-overlay-template=\"<h3>#{ad_b.title}</h3><p>#{context}</p>\"
|
||||
|
@ -106,7 +106,7 @@ class AdBannersController < ApplicationController
|
|||
@file_poster = ad_b.video_snapshot.url rescue nil
|
||||
title = (ad_b.title.blank? ? File.basename(video_url) : ad_b.title)
|
||||
image_html = "<div class=\"w-ad-banner__slide w-ba-banner__slide #{klass} jplayer_slide\"
|
||||
data-link=\"#{ad_b.out_link || "#"}'\"
|
||||
data-link=\"#{ad_b.out_link || "#"}\"
|
||||
data-cycle-title=\"#{ad_b.title}\"
|
||||
data-cycle-desc=\"#{context}\"
|
||||
data-overlay-template=\"<h3>#{ad_b.title}</h3><p>#{context}</p>\"
|
||||
|
@ -122,7 +122,7 @@ class AdBannersController < ApplicationController
|
|||
image_html = "<div class=\"w-ad-banner__slide w-ba-banner__slide #{klass} youtube youtube_slide\"
|
||||
data-yt-binded=\"0\"
|
||||
data-youtube-id=\"ytplayer#{i}\"
|
||||
data-link=\"#{ad_b.out_link || "#"}'\"
|
||||
data-link=\"#{ad_b.out_link || "#"}\"
|
||||
data-cycle-title=\"#{ad_b.title}\"
|
||||
data-cycle-desc=\"#{context}\"
|
||||
data-overlay-template=\"<h3>#{ad_b.title}</h3><p>#{context}</p>\"
|
||||
|
|
|
@ -189,7 +189,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
|
|||
}
|
||||
function onYouTubeIframeAPIReady(){
|
||||
$(".w-ba-banner").on('cycle-post-initialize', function(){
|
||||
init_banner(banner);
|
||||
init_banner(this);
|
||||
});
|
||||
function init_banner(banner){
|
||||
var $banner = $(banner);
|
||||
|
@ -251,6 +251,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
|
|||
event_dict[relation_key].onStateChange = [];
|
||||
event_dict[count_key] = event_dict[array_key].length;
|
||||
yt_player.addEventListener('onStateChange',onPlayerStateChange);
|
||||
banner_wrap.trigger('resize');
|
||||
}else{
|
||||
console.log("YT player changes its variables!")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue