2014-01-12 08:58:47 -07:00
|
|
|
|
(function ($, document, apiClient) {
|
|
|
|
|
|
|
|
|
|
function reload(page) {
|
|
|
|
|
|
|
|
|
|
Dashboard.showLoadingMsg();
|
2014-05-09 12:43:06 -07:00
|
|
|
|
var screenWidth = $(window).width();
|
2014-01-12 08:58:47 -07:00
|
|
|
|
|
|
|
|
|
apiClient.getLiveTvRecommendedPrograms({
|
|
|
|
|
|
|
|
|
|
userId: Dashboard.getCurrentUserId(),
|
|
|
|
|
IsAiring: true,
|
2014-03-09 15:14:44 -07:00
|
|
|
|
limit: 12
|
2014-01-12 08:58:47 -07:00
|
|
|
|
|
|
|
|
|
}).done(function (result) {
|
2014-05-09 12:43:06 -07:00
|
|
|
|
|
2014-01-12 08:58:47 -07:00
|
|
|
|
var html = LibraryBrowser.getPosterViewHtml({
|
|
|
|
|
|
|
|
|
|
items: result.Items,
|
2014-05-29 07:19:12 -07:00
|
|
|
|
shape: "auto",
|
2014-01-12 08:58:47 -07:00
|
|
|
|
showTitle: true,
|
|
|
|
|
showParentTitle: true,
|
2014-05-09 12:43:06 -07:00
|
|
|
|
overlayText: screenWidth >= 600,
|
2014-01-12 08:58:47 -07:00
|
|
|
|
coverImage: true
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
2014-03-15 21:23:58 -07:00
|
|
|
|
$('.activeProgramItems', page).html(html).createPosterItemMenus();
|
2014-01-12 08:58:47 -07:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
apiClient.getLiveTvRecommendedPrograms({
|
|
|
|
|
|
|
|
|
|
userId: Dashboard.getCurrentUserId(),
|
|
|
|
|
IsAiring: false,
|
|
|
|
|
HasAired: false,
|
2014-03-09 15:14:44 -07:00
|
|
|
|
limit: 12
|
2014-01-12 08:58:47 -07:00
|
|
|
|
|
|
|
|
|
}).done(function (result) {
|
|
|
|
|
|
|
|
|
|
var html = LibraryBrowser.getPosterViewHtml({
|
|
|
|
|
|
|
|
|
|
items: result.Items,
|
2014-05-29 07:19:12 -07:00
|
|
|
|
shape: "auto",
|
2014-01-12 08:58:47 -07:00
|
|
|
|
showTitle: true,
|
|
|
|
|
showParentTitle: true,
|
2014-05-09 12:43:06 -07:00
|
|
|
|
overlayText: screenWidth >= 600,
|
2014-01-12 08:58:47 -07:00
|
|
|
|
coverImage: true
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
2014-03-15 21:23:58 -07:00
|
|
|
|
$('.upcomingProgramItems', page).html(html).createPosterItemMenus();
|
2014-01-12 08:58:47 -07:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
reload(page);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})(jQuery, document, ApiClient);
|