From bcb4b9da3363a53fc49555304569323683ba7990 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 1 Jan 2014 22:53:27 -0500 Subject: [PATCH] reduce image indicator sizes --- ApiClient.js | 23 +++++++++++++++++---- dashboard-ui/css/site.css | 2 +- dashboard-ui/css/tileitem.css | 2 +- dashboard-ui/livetvchannel.html | 1 - dashboard-ui/livetvrecordinglist.html | 1 + dashboard-ui/scripts/itemdetailpage.js | 8 ++++--- dashboard-ui/scripts/livetvchannel.js | 11 +--------- dashboard-ui/scripts/livetvchannels.js | 4 +--- dashboard-ui/scripts/livetvrecordinglist.js | 16 ++++++++++++-- dashboard-ui/scripts/loginpage.js | 4 ++-- packages.config | 2 +- 11 files changed, 46 insertions(+), 28 deletions(-) diff --git a/ApiClient.js b/ApiClient.js index 592cf2bad..73f0207b8 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -395,10 +395,10 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi throw new Error("null id"); } - var options = { - + var options = { + }; - + if (userId) { options.userId = userId; } @@ -456,6 +456,21 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + self.getLiveTvRecordingGroup = function (id) { + + if (!id) { + throw new Error("null id"); + } + + var url = self.getUrl("LiveTv/Recordings/Groups/" + id); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + self.getLiveTvRecording = function (id, userId) { if (!id) { @@ -559,7 +574,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi self.getNewLiveTvTimerDefaults = function (options) { options = options || {}; - + var url = self.getUrl("LiveTv/Timers/Defaults", options); return self.ajax({ diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 2d283dcbe..3edb84c6b 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -408,7 +408,7 @@ h1 .imageLink { @media all and (min-width: 900px) { - .page:not(.wizardPage) .header { + .page:not(.standalonePage) .header { padding-top: 0; } } diff --git a/dashboard-ui/css/tileitem.css b/dashboard-ui/css/tileitem.css index 646b992ca..a9984707f 100644 --- a/dashboard-ui/css/tileitem.css +++ b/dashboard-ui/css/tileitem.css @@ -106,7 +106,7 @@ } .tileName { - font-weight: bold; + font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; diff --git a/dashboard-ui/livetvchannel.html b/dashboard-ui/livetvchannel.html index 8c603a49f..14dd84935 100644 --- a/dashboard-ui/livetvchannel.html +++ b/dashboard-ui/livetvchannel.html @@ -19,7 +19,6 @@

-

diff --git a/dashboard-ui/livetvrecordinglist.html b/dashboard-ui/livetvrecordinglist.html index 640cec8f3..fff562fd3 100644 --- a/dashboard-ui/livetvrecordinglist.html +++ b/dashboard-ui/livetvrecordinglist.html @@ -13,6 +13,7 @@ Series
+

diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index af31d75df..c4724755b 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -522,15 +522,17 @@ function renderChildren(page, item, user) { - var sortBy = item.Type == "BoxSet" ? "ProductionYear,SortName" : "SortName"; - var fields = "ItemCounts,DateCreated,AudioInfo,PrimaryImageAspectRatio"; var query = { ParentId: item.Id, - SortBy: sortBy, Fields: fields }; + + // Let the server pre-sort boxsets + if (item.Type !== "BoxSet") { + query.SortBy = "SortName"; + } var promise; diff --git a/dashboard-ui/scripts/livetvchannel.js b/dashboard-ui/scripts/livetvchannel.js index f455d269d..6efd7bb4f 100644 --- a/dashboard-ui/scripts/livetvchannel.js +++ b/dashboard-ui/scripts/livetvchannel.js @@ -3,14 +3,6 @@ var currentItem; var programs; - function cancelRecording(page, id) { - - } - - function scheduleRecording(page, id) { - - } - function renderPrograms(page, result) { var html = ''; @@ -136,8 +128,7 @@ Dashboard.setPageTitle(name); - $('.itemName', page).html(name); - $('.itemChannelNumber', page).html(item.Number); + $('.itemName', page).html(item.Number + ' ' + name); $('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item)); diff --git a/dashboard-ui/scripts/livetvchannels.js b/dashboard-ui/scripts/livetvchannels.js index 49426fc85..226dab728 100644 --- a/dashboard-ui/scripts/livetvchannels.js +++ b/dashboard-ui/scripts/livetvchannels.js @@ -33,9 +33,7 @@ html += '
'; - html += '
' + channel.Name + '
'; - - html += '

' + channel.Number + '

'; + html += '
' + channel.Number + ' ' + channel.Name + '
'; html += '

' + LibraryBrowser.getUserDataIconsHtml(channel) + '

'; diff --git a/dashboard-ui/scripts/livetvrecordinglist.js b/dashboard-ui/scripts/livetvrecordinglist.js index bbbfb677b..07342ca5e 100644 --- a/dashboard-ui/scripts/livetvrecordinglist.js +++ b/dashboard-ui/scripts/livetvrecordinglist.js @@ -23,7 +23,7 @@ updateFilterControls(); html += LibraryBrowser.getPosterViewHtml({ - + items: result.Items, shape: "square", showTitle: true, @@ -77,6 +77,8 @@ }).on('pagebeforeshow', "#liveTvRecordingListPage", function () { + var page = this; + var limit = LibraryBrowser.getDefaultPageSize(); // If the default page size has changed, the start index will have to be reset @@ -92,7 +94,17 @@ query.GroupId = groupId; } - reloadItems(this); + reloadItems(page); + + if (query.GroupId) { + + ApiClient.getLiveTvRecordingGroup(query.GroupId).done(function (group) { + $('.listName', page).show().html(group.Name); + }); + + } else { + $('.listName', page).hide(); + } }).on('pageshow', "#liveTvRecordingListPage", function () { diff --git a/dashboard-ui/scripts/loginpage.js b/dashboard-ui/scripts/loginpage.js index 2d53f16e4..104a3387c 100644 --- a/dashboard-ui/scripts/loginpage.js +++ b/dashboard-ui/scripts/loginpage.js @@ -135,9 +135,9 @@ html += '
'; } - html += '
' + user.Name + '
'; + html += '
' + user.Name + '
'; - html += '
'; + html += '
'; var lastSeen = LoginPage.getLastSeenText(user.LastActivityDate); if (lastSeen != "") { html += lastSeen; diff --git a/packages.config b/packages.config index 7c295df9d..c0e73ca45 100644 --- a/packages.config +++ b/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file