3.0.5588.1

This commit is contained in:
Luke Pulverenti 2015-04-22 09:28:45 -04:00
parent 28277ae30d
commit 796843e9f3
3 changed files with 61 additions and 1 deletions

View File

@ -110,6 +110,12 @@
<a href="gamestudios.html">${TabStudios}</a> <a href="gamestudios.html">${TabStudios}</a>
</div> </div>
</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> <div class="channelHeader" style="display: none;"></div>

View File

@ -282,6 +282,9 @@
$('.lnkMovies', page).addClass('ui-btn-active'); $('.lnkMovies', page).addClass('ui-btn-active');
} }
} }
else if (context == 'channels') {
elem = $('.channelTabs', page).show();
}
else if (item.Type == "MusicAlbum") { else if (item.Type == "MusicAlbum") {
$('#albumTabs', page).show(); $('#albumTabs', page).show();
} }

View File

@ -40,6 +40,8 @@
updateFilterControls(page); updateFilterControls(page);
var defaultAction = query.MediaTypes == 'Photo' ? 'photoslideshow' : null;
// Poster // Poster
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
@ -47,7 +49,8 @@
context: getParameterByName('context') || 'photos', context: getParameterByName('context') || 'photos',
showTitle: false, showTitle: false,
centerText: true, centerText: true,
lazy: true lazy: true,
defaultAction: defaultAction
}); });
var elem = $('#items', page).html(html).lazyChildren(); var elem = $('#items', page).html(html).lazyChildren();
@ -134,6 +137,50 @@
query.ParentId = getParameterByName('parentId') || LibraryMenu.getTopParentId(); 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 () { $(document).on('pageinit', "#photosPage", function () {
var page = this; var page = this;
@ -197,6 +244,10 @@
reloadItems(page); reloadItems(page);
}); });
$('.itemsContainer', page).on('photoslideshow', function (e, index) {
startSlideshow(page, index);
});
}).on('pagebeforeshow', "#photosPage", function () { }).on('pagebeforeshow', "#photosPage", function () {
var page = this; var page = this;