mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
copy dashboard to the output folder and load from the file system, instead of using embedded resources
This commit is contained in:
parent
799eebc9ed
commit
4dd9477bcd
137 changed files with 1424 additions and 1438 deletions
46
dashboard-ui/scripts/ItemListPage.js
Normal file
46
dashboard-ui/scripts/ItemListPage.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
var ItemListPage = {
|
||||
|
||||
onPageShow: function () {
|
||||
|
||||
ItemListPage.reload();
|
||||
},
|
||||
|
||||
reload: function () {
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var parentId = getParameterByName('parentId');
|
||||
|
||||
var query = {};
|
||||
|
||||
if (parentId) {
|
||||
query.parentId = parentId;
|
||||
|
||||
ApiClient.getItem(userId, parentId).done(ItemListPage.renderTitle);
|
||||
}
|
||||
|
||||
ApiClient.getItems(userId, query).done(ItemListPage.renderItems);
|
||||
},
|
||||
|
||||
renderItems: function(result) {
|
||||
|
||||
var items = result.Items;
|
||||
|
||||
var renderOptions = {
|
||||
|
||||
items: items
|
||||
};
|
||||
|
||||
var html = Dashboard.getPosterViewHtml(renderOptions);
|
||||
|
||||
$('#listItems', $.mobile.activePage).html(html);
|
||||
},
|
||||
|
||||
renderTitle: function (item) {
|
||||
|
||||
|
||||
$('#itemName', $.mobile.activePage).html(item.Name);
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('pageshow', "#itemListPage", ItemListPage.onPageShow);
|
Loading…
Add table
Add a link
Reference in a new issue