2014-01-12 08:58:47 -07:00
|
|
|
|
(function ($, document, apiClient) {
|
|
|
|
|
|
|
|
|
|
function reload(page) {
|
|
|
|
|
|
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
|
|
|
|
|
var html = LibraryBrowser.getPosterViewHtml({
|
|
|
|
|
|
|
|
|
|
items: result.Items,
|
2014-03-09 15:14:44 -07:00
|
|
|
|
shape: "square",
|
2014-01-12 08:58:47 -07:00
|
|
|
|
showTitle: true,
|
|
|
|
|
showParentTitle: true,
|
|
|
|
|
overlayText: true,
|
|
|
|
|
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-03-09 15:14:44 -07:00
|
|
|
|
shape: "square",
|
2014-01-12 08:58:47 -07:00
|
|
|
|
showTitle: true,
|
|
|
|
|
showParentTitle: true,
|
|
|
|
|
overlayText: true,
|
|
|
|
|
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);
|