1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix swipebox

This commit is contained in:
Luke Pulverenti 2014-11-26 14:29:49 -05:00
parent 9d64691fc1
commit f85a900730
6 changed files with 89 additions and 74 deletions

View file

@ -110,7 +110,7 @@
@media all and (min-width: 600px) {
.itemsContainer:not(.fullWidthItemsContainer):not(.smallItemsContainer) {
padding: 0 1em;
padding: 0 .8em;
margin-right: 10px;
}
}

View file

@ -192,8 +192,10 @@
};
});
index = Math.max(index || 0, 0);
$.swipebox(slideshowItems, {
initialIndexOnArray: index || 0,
initialIndexOnArray: index,
hideBarsDelay: 30000
});
}

View file

@ -823,6 +823,10 @@
}
else if (action == 'photoslideshow') {
if (!$(elem).hasClass('card')) {
elem = $(elem).parents('.card')[0];
}
itemsContainer = $(elem).parents('.itemsContainer');
index = $('.card', itemsContainer).get().indexOf(elem);

View file

@ -289,6 +289,14 @@
});
};
self.get = function (url) {
return self.ajax({
type: "GET",
url: url
});
};
self.getJSON = function (url) {
return self.ajax({

View file

@ -1,4 +1,4 @@
/*! Swipebox v1.3.0.1 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
/*! Swipebox v1.3.0.2 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
;( function ( window, document, $, undefined ) {
@ -17,7 +17,8 @@
beforeOpen: null,
afterOpen: null,
afterClose: null,
loopAtEnd: false
loopAtEnd: false,
autoplayVideos: false
},
plugin = this,
@ -738,11 +739,11 @@
if ( youtubeShortUrl ) {
youtubeUrl = youtubeShortUrl;
}
iframe = '<iframe width="560" height="315" src="//www.youtube.com/embed/' + youtubeUrl[1] + '" frameborder="0" allowfullscreen></iframe>';
iframe = '<iframe width="560" height="315" src="//www.youtube.com/embed/' + youtubeUrl[1] + '?autoplay='+ plugin.settings.autoplayVideos + '" frameborder="0" allowfullscreen></iframe>';
} else if ( vimeoUrl ) {
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?byline=0&amp;portrait=0&amp;color='+plugin.settings.vimeoColor+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?byline=0&amp;portrait=0&amp;color=' + plugin.settings.vimeoColor + '&autoplay=' + plugin.settings.autoplayVideos + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
}
@ -752,7 +753,7 @@
iframe = '<iframe width="560" height="315" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
}
return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videomaxWidth + 'px"><div class="swipebox-video">'+iframe+'</div></div>';
return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videomaxWidth + 'px"><div class="swipebox-video">' + iframe + '</div></div>';
},
/**

File diff suppressed because one or more lines are too long