row-js.php
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
if($settings->bg_type == 'slideshow') :
$source = FLBuilderModel::get_row_slideshow_source($row);
if(!empty($source)) :
?>
YUI({'logExclude': { 'yui': true } }).use('fl-slideshow', function(Y) {
if( null === Y.one('.fl-node-<?php echo $id; ?> .fl-bg-slideshow') ) {
return;
}
var oldSlideshow = Y.one('.fl-node-<?php echo $id; ?> .fl-bg-slideshow .fl-slideshow'),
newSlideshow = new Y.FL.Slideshow({
autoPlay : true,
crop : true,
loadingImageEnabled : false,
randomize : <?php echo $settings->ss_randomize; ?>,
responsiveThreshold : 0,
source : [{<?php echo $source; ?>}],
speed : <?php echo $settings->ss_speed * 1000; ?>,
stretchy : true,
stretchyType : 'contain',
transition : '<?php echo $settings->ss_transition; ?>',
transitionDuration : <?php echo !empty($settings->ss_transitionDuration) ? $settings->ss_transitionDuration : 1; ?>
});
if(oldSlideshow) {
oldSlideshow.remove(true);
}
newSlideshow.render('.fl-node-<?php echo $id; ?> .fl-bg-slideshow');
});
<?php
endif;
endif;
?>