mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
16cf53b2cf
18
dashboard-ui/channelitems.html
Normal file
18
dashboard-ui/channelitems.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Media Browser</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="channelItemsPage" data-role="page" class="page libraryPage" data-theme="b" data-view="channels">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
18
dashboard-ui/channels.html
Normal file
18
dashboard-ui/channels.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Media Browser</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="channelsPage" data-role="page" class="page libraryPage" data-theme="b" data-view="channels">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="viewSettings">
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
|
||||
<h3>Active Connections</h3>
|
||||
<h3>Active Devices</h3>
|
||||
<div>
|
||||
<table class="tblConnections" style="border-collapse: collapse;">
|
||||
</table>
|
||||
|
88
dashboard-ui/scripts/channelitems.js
Normal file
88
dashboard-ui/scripts/channelitems.js
Normal file
@ -0,0 +1,88 @@
|
||||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function getSavedQueryId() {
|
||||
return 'channels-' + getParameterByName('id');
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var channelId = getParameterByName('id');
|
||||
|
||||
query.UserId = Dashboard.getCurrentUserId();
|
||||
|
||||
$.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
$(document).scrollTop(0);
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
updateFilterControls(page);
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
context: 'channels',
|
||||
useAverageAspectRatio: true,
|
||||
showTitle: true,
|
||||
centerText: true
|
||||
});
|
||||
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus();
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryId(), query);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#channelItemsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
LibraryBrowser.loadSavedQueryValues(getSavedQueryId(), query);
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#channelItemsPage", function () {
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
82
dashboard-ui/scripts/channels.js
Normal file
82
dashboard-ui/scripts/channels.js
Normal file
@ -0,0 +1,82 @@
|
||||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
query.UserId = Dashboard.getCurrentUserId();
|
||||
|
||||
$.getJSON(ApiClient.getUrl("Channels", query)).done(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
$(document).scrollTop(0);
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
updateFilterControls(page);
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "square",
|
||||
context: 'channels',
|
||||
useAverageAspectRatio: true,
|
||||
showTitle: true,
|
||||
centerText: true
|
||||
});
|
||||
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus();
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues('channels', query);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#channelsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
LibraryBrowser.loadSavedQueryValues('channels', query);
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#channelsPage", function () {
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
@ -368,6 +368,9 @@
|
||||
if (item.Type == "TvChannel") {
|
||||
return "livetvchannel.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "Channel") {
|
||||
return "channelitems.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "Program") {
|
||||
return "livetvprogram.html?id=" + id;
|
||||
}
|
||||
@ -728,7 +731,7 @@
|
||||
var chkItemSelectId = 'chkItemSelect' + i;
|
||||
|
||||
// Render this pre-enhanced to save on jquery mobile dom manipulation
|
||||
html += '<div class="itemSelectionPanel" onclick="return false;"><div class="ui-checkbox ui-mini"><label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="' + chkItemSelectId + '">Select</label><input data-mini="true" id="' + chkItemSelectId + '" type="checkbox" class="chkItemSelect" data-enhanced="true" /></div></div>';
|
||||
html += '<div class="itemSelectionPanel" onclick="return false;"><div class="ui-checkbox"><label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="' + chkItemSelectId + '">Select</label><input id="' + chkItemSelectId + '" type="checkbox" class="chkItemSelect" data-enhanced="true" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
|
@ -260,11 +260,11 @@
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
|
||||
sequence.createContextMenu({
|
||||
getOptions: getContextMenuOptions,
|
||||
command: onMenuCommand,
|
||||
selector: '.posterItem'
|
||||
});
|
||||
//sequence.createContextMenu({
|
||||
// getOptions: getContextMenuOptions,
|
||||
// command: onMenuCommand,
|
||||
// selector: '.posterItem'
|
||||
//});
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -92,6 +92,10 @@
|
||||
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'games' ? selectedCssClass : '') + '" href="gamesrecommended.html">' + (view == 'games' ? selectedHtml : '') + '<span class="viewName">Games</span></a>';
|
||||
}
|
||||
|
||||
if (counts.ChannelCount) {
|
||||
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'channels' ? selectedCssClass : '') + '" href="channels.html">' + (view == 'channels' ? selectedHtml : '') + '<span class="viewName">Channels</span></a>';
|
||||
}
|
||||
|
||||
//if (counts.BoxSetCount) {
|
||||
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'boxsets' ? selectedCssClass : '') + '" href="collections.html">' + (view == 'boxsets' ? selectedHtml : '') + '<span class="viewName">Collections</span></a>';
|
||||
//}
|
||||
@ -144,6 +148,10 @@
|
||||
html += '<li><a class="libraryPanelLink" href="musicrecommended.html">Music</a></li>';
|
||||
}
|
||||
|
||||
if (counts.ChannelCount) {
|
||||
html += '<li><a class="libraryPanelLink" href="channels.html">Channels</a></li>';
|
||||
}
|
||||
|
||||
if (counts.GameCount) {
|
||||
html += '<li><a class="libraryPanelLink" href="gamesrecommended.html">Games</a></li>';
|
||||
}
|
||||
|
@ -13,7 +13,8 @@
|
||||
IncludeItemTypes: "Movie",
|
||||
IsMissing: false,
|
||||
IsVirtualUnaired: false,
|
||||
Limit: 300
|
||||
Limit: 300,
|
||||
CollapseBoxSetItems: false
|
||||
};
|
||||
|
||||
function getHeaderCells(reportType) {
|
||||
|
Loading…
Reference in New Issue
Block a user