mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix swipebox
This commit is contained in:
parent
9d64691fc1
commit
f85a900730
6 changed files with 89 additions and 74 deletions
|
@ -110,7 +110,7 @@
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
|
|
||||||
.itemsContainer:not(.fullWidthItemsContainer):not(.smallItemsContainer) {
|
.itemsContainer:not(.fullWidthItemsContainer):not(.smallItemsContainer) {
|
||||||
padding: 0 1em;
|
padding: 0 .8em;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,10 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
index = Math.max(index || 0, 0);
|
||||||
|
|
||||||
$.swipebox(slideshowItems, {
|
$.swipebox(slideshowItems, {
|
||||||
initialIndexOnArray: index || 0,
|
initialIndexOnArray: index,
|
||||||
hideBarsDelay: 30000
|
hideBarsDelay: 30000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -823,6 +823,10 @@
|
||||||
}
|
}
|
||||||
else if (action == 'photoslideshow') {
|
else if (action == 'photoslideshow') {
|
||||||
|
|
||||||
|
if (!$(elem).hasClass('card')) {
|
||||||
|
elem = $(elem).parents('.card')[0];
|
||||||
|
}
|
||||||
|
|
||||||
itemsContainer = $(elem).parents('.itemsContainer');
|
itemsContainer = $(elem).parents('.itemsContainer');
|
||||||
index = $('.card', itemsContainer).get().indexOf(elem);
|
index = $('.card', itemsContainer).get().indexOf(elem);
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,14 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.get = function (url) {
|
||||||
|
|
||||||
|
return self.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
self.getJSON = function (url) {
|
self.getJSON = function (url) {
|
||||||
|
|
||||||
return self.ajax({
|
return self.ajax({
|
||||||
|
|
|
@ -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 ) {
|
;( function ( window, document, $, undefined ) {
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
||||||
beforeOpen: null,
|
beforeOpen: null,
|
||||||
afterOpen: null,
|
afterOpen: null,
|
||||||
afterClose: null,
|
afterClose: null,
|
||||||
loopAtEnd: false
|
loopAtEnd: false,
|
||||||
|
autoplayVideos: false
|
||||||
},
|
},
|
||||||
|
|
||||||
plugin = this,
|
plugin = this,
|
||||||
|
@ -738,11 +739,11 @@
|
||||||
if ( youtubeShortUrl ) {
|
if ( youtubeShortUrl ) {
|
||||||
youtubeUrl = 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 ) {
|
} else if ( vimeoUrl ) {
|
||||||
|
|
||||||
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?byline=0&portrait=0&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&portrait=0&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>';
|
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
Loading…
Add table
Add a link
Reference in a new issue