diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js
new file mode 100644
index 0000000000..ca0f7ad4ff
--- /dev/null
+++ b/dashboard-ui/scripts/channelitems.js
@@ -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);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/channels.js b/dashboard-ui/scripts/channels.js
new file mode 100644
index 0000000000..6161ba511d
--- /dev/null
+++ b/dashboard-ui/scripts/channels.js
@@ -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);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index 4d64532b51..7aa544efdc 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -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 += '
';
+ html += '
';
}
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 005b285cc4..f95219a413 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -260,11 +260,11 @@
if (user.Configuration.IsAdministrator) {
- sequence.createContextMenu({
- getOptions: getContextMenuOptions,
- command: onMenuCommand,
- selector: '.posterItem'
- });
+ //sequence.createContextMenu({
+ // getOptions: getContextMenuOptions,
+ // command: onMenuCommand,
+ // selector: '.posterItem'
+ //});
}
});
diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js
index ff9311e797..98e7c2db12 100644
--- a/dashboard-ui/scripts/librarymenu.js
+++ b/dashboard-ui/scripts/librarymenu.js
@@ -92,8 +92,12 @@
html += '';
}
+ if (counts.ChannelCount) {
+ html += '';
+ }
+
//if (counts.BoxSetCount) {
- html += '';
+ html += '';
//}
$('.viewMenuRemoteControlButton', page).before(html);
@@ -144,12 +148,16 @@
html += '
Music';
}
+ if (counts.ChannelCount) {
+ html += '
Channels';
+ }
+
if (counts.GameCount) {
html += '
Games';
}
//if (counts.BoxSetCount) {
- html += '
Collections';
+ html += '
Collections';
//}
html += '';
diff --git a/dashboard-ui/scripts/libraryreport.js b/dashboard-ui/scripts/libraryreport.js
index 629f6115d1..64135d5117 100644
--- a/dashboard-ui/scripts/libraryreport.js
+++ b/dashboard-ui/scripts/libraryreport.js
@@ -13,7 +13,8 @@
IncludeItemTypes: "Movie",
IsMissing: false,
IsVirtualUnaired: false,
- Limit: 300
+ Limit: 300,
+ CollapseBoxSetItems: false
};
function getHeaderCells(reportType) {