mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
3.0.5588.1
This commit is contained in:
parent
28277ae30d
commit
796843e9f3
@ -110,6 +110,12 @@
|
||||
<a href="gamestudios.html">${TabStudios}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="itemTabs channelTabs" style="display: none;">
|
||||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="channelslatest.html">${TabLatest}</a>
|
||||
<a href="channels.html" class="ui-btn-active">${TabChannels}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="channelHeader" style="display: none;"></div>
|
||||
|
||||
|
@ -282,6 +282,9 @@
|
||||
$('.lnkMovies', page).addClass('ui-btn-active');
|
||||
}
|
||||
}
|
||||
else if (context == 'channels') {
|
||||
elem = $('.channelTabs', page).show();
|
||||
}
|
||||
else if (item.Type == "MusicAlbum") {
|
||||
$('#albumTabs', page).show();
|
||||
}
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
updateFilterControls(page);
|
||||
|
||||
var defaultAction = query.MediaTypes == 'Photo' ? 'photoslideshow' : null;
|
||||
|
||||
// Poster
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
@ -47,7 +49,8 @@
|
||||
context: getParameterByName('context') || 'photos',
|
||||
showTitle: false,
|
||||
centerText: true,
|
||||
lazy: true
|
||||
lazy: true,
|
||||
defaultAction: defaultAction
|
||||
});
|
||||
|
||||
var elem = $('#items', page).html(html).lazyChildren();
|
||||
@ -134,6 +137,50 @@
|
||||
query.ParentId = getParameterByName('parentId') || LibraryMenu.getTopParentId();
|
||||
}
|
||||
|
||||
function startSlideshow(page, index) {
|
||||
|
||||
index += (query.StartIndex || 0);
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var localQuery = $.extend({}, query);
|
||||
localQuery.StartIndex = 0;
|
||||
localQuery.Limit = null;
|
||||
localQuery.MediaTypes = "Photo";
|
||||
localQuery.Recursive = true;
|
||||
localQuery.Filters = "IsNotFolder";
|
||||
|
||||
ApiClient.getItems(userId, localQuery).done(function (result) {
|
||||
|
||||
showSlideshow(page, result.Items, index);
|
||||
});
|
||||
}
|
||||
|
||||
function showSlideshow(page, items, index) {
|
||||
|
||||
var slideshowItems = items.map(function (item) {
|
||||
|
||||
var imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
|
||||
tag: item.ImageTags.Primary,
|
||||
type: 'Primary'
|
||||
|
||||
});
|
||||
|
||||
return {
|
||||
title: item.Name,
|
||||
href: imgUrl
|
||||
};
|
||||
});
|
||||
|
||||
index = Math.max(index || 0, 0);
|
||||
|
||||
$.swipebox(slideshowItems, {
|
||||
initialIndexOnArray: index,
|
||||
hideBarsDelay: 30000
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#photosPage", function () {
|
||||
|
||||
var page = this;
|
||||
@ -197,6 +244,10 @@
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.itemsContainer', page).on('photoslideshow', function (e, index) {
|
||||
startSlideshow(page, index);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#photosPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
Loading…
Reference in New Issue
Block a user