1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

display news on dashboard home page

This commit is contained in:
Luke Pulverenti 2014-01-18 16:52:01 -05:00
parent 1fa7dcdb2b
commit b932873b1d
5 changed files with 205 additions and 88 deletions

View file

@ -21,6 +21,33 @@
}
});
DashboardPage.reloadNews(page);
},
reloadNews: function (page) {
ApiClient.getProductNews({
limit: 5
}).done(function (result) {
var html = result.Items.map(function (item) {
var itemHtml = '';
itemHtml += '<div class="newsItem">';
itemHtml += '<a class="newsItemHeader" href="' + item.Link + '" target="_blank">' + item.Title + '</a>';
itemHtml += '<div class="newsItemDescription">' + item.Description + '</div>';
itemHtml += '</div>';
return itemHtml;
});
$('.latestNewsItems', page).html(html.join(''));
});
},
onPageHide: function () {