diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 9caa29de0b..c854ce65b4 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -35,6 +35,8 @@ padding: 0; border-spacing: 0; border-collapse: collapse; + margin: 0 auto; + max-width: 1540px; } .ehsContent td { @@ -42,6 +44,10 @@ border-spacing: 0; } +.squareEhsContent { + max-width: 1420px; +} + .detailPageContent { margin: 0 auto; padding: 0; @@ -330,7 +336,7 @@ a.itemTag:hover { } .lnkPreviousItem { - left: 210px; + left: 10px; } .lnkNextItem { @@ -474,7 +480,6 @@ a.itemTag:hover { .libraryPanelHeader span { color: #fff; vertical-align: middle; - font-size: 16px; font-weight: 300; } @@ -498,12 +503,6 @@ a.itemTag:hover { font-family: 'Open Sans', Arial, Helvetica, sans-serif; } -.desktopHomeLink img { - height: 24px; - vertical-align: middle; - margin-right: 5px; -} - .detailImageProgressContainer { position: absolute; bottom: 10px; @@ -856,6 +855,7 @@ a.itemTag:hover { } .itemsContainer { + text-align: center; } .timelineItemsContainer { @@ -1130,11 +1130,11 @@ a.itemTag:hover { padding: 1em 1em 1em 170px; } -.spotlightContentInner p { - max-height: 130px; - overflow: hidden; - text-overflow: ellipsis; -} + .spotlightContentInner p { + max-height: 130px; + overflow: hidden; + text-overflow: ellipsis; + } .rightSpotlightContent .spotlightContentInner { padding: 195px 1em 1em 1em; diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 3152e792a6..235ffa09b9 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -6,22 +6,6 @@ padding-top: 102px !important; } -.desktopLibraryMenu { - position: fixed; - left: 0; - z-index: 1001; - top: 53px; - width: 200px; - min-height: 100px; - border-bottom-right-radius: 5px; - padding-bottom: 10px; - background-color: rgba(0,0,0,.6); -} - -.metadataEditorPage .desktopLibraryMenu { - display: none; -} - .libraryMenuDivider { height: 1px; background: #333; @@ -52,7 +36,8 @@ } .viewMenuLink:hover { - background-color: #555; + background-color: #52B54B; + color: #fff!important; } .viewMenuBar .btnCurrentUser { @@ -142,10 +127,6 @@ background-color: rgba(51,136,204,.8)!important; } -.ui-panel.ui-body-b { - background-color: #181818; -} - .libraryViewNav { height: 48px; overflow: hidden; @@ -158,6 +139,10 @@ background-color: #181818; } +.ui-panel.ui-body-b { + background-color: #181818; +} + .libraryViewNavInner { text-align: center; font-size: 14px; @@ -206,38 +191,22 @@ @media all and (min-width: 1099px) { - .libraryMenuButton { - display: none; - } - - .libraryPage:not(.itemDetailPage):not(.metadataEditorPage) { + /*.type-home { left: 215px !important; width: auto !important; right: 0 !important; - } + }*/ .viewSettings { padding-left: .4em; } } -@media all and (max-width: 1099px) { +@media all and (max-width: 459px) { .desktopHomeLink { display: none; } - - .desktopLibraryMenu { - display: none; - } - - .viewSettings { - text-align: center; - } - - .itemsContainer { - text-align: center; - } } @media all and (min-width: 750px) { diff --git a/dashboard-ui/livetvguide.html b/dashboard-ui/livetvguide.html index d9bfe4a356..93ce45ae8e 100644 --- a/dashboard-ui/livetvguide.html +++ b/dashboard-ui/livetvguide.html @@ -27,16 +27,16 @@
-
- -
+
+ +
 
- -
-
-
+ +
+
+
diff --git a/dashboard-ui/livetvrecordinglist.html b/dashboard-ui/livetvrecordinglist.html index 74e8b39ba4..198c806183 100644 --- a/dashboard-ui/livetvrecordinglist.html +++ b/dashboard-ui/livetvrecordinglist.html @@ -14,8 +14,10 @@ ${TabSeries}
-

+ +

+
diff --git a/dashboard-ui/livetvsuggested.html b/dashboard-ui/livetvsuggested.html index e9fb9748fe..cd29debbc5 100644 --- a/dashboard-ui/livetvsuggested.html +++ b/dashboard-ui/livetvsuggested.html @@ -14,7 +14,7 @@ ${TabSeries}
- +
diff --git a/dashboard-ui/musicrecommended.html b/dashboard-ui/musicrecommended.html index 2894244679..6f1256f1d3 100644 --- a/dashboard-ui/musicrecommended.html +++ b/dashboard-ui/musicrecommended.html @@ -15,7 +15,7 @@ ${TabMusicVideos}
- +

${HeaderLatestAlbums}

diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index b94ef06d25..4e27a600ed 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -36,7 +36,7 @@
- +
diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 74d90ace16..265950aa03 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -128,7 +128,7 @@ if (ApiClient.isWebSocketOpen()) { ApiClient.sendWebSocketMessage("SessionsStart", "0,1500"); - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "0,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "0,1000"); } }, @@ -257,15 +257,10 @@ html += '
'; - if (nowPlayingItem) { + var nowPlayingName = DashboardPage.getNowPlayingName(connection); - var nowPlayingName = DashboardPage.getNowPlayingName(connection); - - html += '
'; - html += nowPlayingName.html; - } else { - html += '
'; - } + html += '
'; + html += nowPlayingName.html; html += '
'; if (nowPlayingItem && nowPlayingItem.RunTimeTicks) { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index bd805c83a7..681e5df543 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -782,51 +782,39 @@ cssClass = options.centerText ? "posterItemText posterItemTextCentered" : "posterItemText"; + var lines = []; + if (options.showParentTitle) { - html += "
"; - html += item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || " "); - html += "
"; + lines.push(item.EpisodeTitle ? item.Name : (item.SeriesName || item.Album || item.AlbumArtist || item.GameSystem || "")); } if (options.showTitle || forceName) { - html += "
"; - html += name; - html += "
"; + lines.push(name); } if (options.showItemCounts) { var itemCountHtml = LibraryBrowser.getItemCountsHtml(options, item); - if (item.Type == "Person" && !itemCountHtml) { - itemCountHtml = " "; - } - - if (itemCountHtml) { - html += "
"; - html += itemCountHtml; - html += "
"; - } + lines.push(itemCountHtml); } if (options.showPremiereDate && item.PremiereDate) { try { - //var date = parseISO8601Date(item.PremiereDate, { toLocal: true }); - - html += "
"; - html += LibraryBrowser.getPremiereDateText(item); - html += "
"; + lines.push(LibraryBrowser.getPremiereDateText(item)); } catch (err) { + lines.push(''); } - } + html += LibraryBrowser.getPosterItemTextLines(lines, cssClass, !options.overlayText); + if (options.overlayText) { if (progressHtml) { @@ -847,6 +835,35 @@ return html; }, + getPosterItemTextLines: function (lines, cssClass, forceLines) { + + var html = ''; + + var valid = 0; + var i, length; + + for (i = 0, length = lines.length; i < length; i++) { + + var text = lines[i]; + + if (text) { + html += "
"; + html += text; + html += "
"; + valid++; + } + } + + if (forceLines) { + while (valid < length) { + html += "
 
"; + valid++; + } + } + + return html; + }, + isYesterday: function (date1) { var today = new Date(); diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 96ef314ef5..9395f7a6f4 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -18,16 +18,12 @@ var html = '
'; - html += ''; + html += ''; - html += 'MEDIABROWSER'; + html += 'MEDIABROWSER'; html += 'Remote Control'; - if (user.Configuration.IsAdministrator) { - html += 'Metadata Manager'; - } - html += '
'; html += ''; @@ -59,14 +55,11 @@ html += '
'; - html += '
'; - html += '
'; - var $page = $(page); $page.prepend(html); - $('.viewMenuBar,.desktopLibraryMenu', page).trigger('create'); + $('.viewMenuBar', page).trigger('create'); $page.trigger('headercreated'); } @@ -76,7 +69,7 @@ return LibraryBrowser.getHref(item); } - function getViewsHtml(userId, counts, items, liveTvInfo) { + function getViewsHtml(user, counts, items, liveTvInfo) { var html = ''; @@ -89,7 +82,7 @@ }).join(''); var showChannels = counts.ChannelCount; - var showLiveTv = liveTvInfo.EnabledUsers.indexOf(userId) != -1; + var showLiveTv = liveTvInfo.EnabledUsers.indexOf(user.Id) != -1; if (showChannels || showLiveTv) { html += '
'; @@ -103,6 +96,11 @@ html += 'Live TV'; } + if (user.Configuration.IsAdministrator) { + html += '
'; + html += 'Metadata Manager'; + } + return html; } @@ -110,21 +108,24 @@ ensurePromises(); - $.when(itemCountsPromise, itemsPromise, liveTvInfoPromise).done(function (response1, response2, response3) { + var userPromise = Dashboard.getCurrentUser(); + + $.when(itemCountsPromise, itemsPromise, liveTvInfoPromise, userPromise).done(function (response1, response2, response3, response4) { var counts = response1[0]; var items = response2[0].Items; var liveTvInfo = response3[0]; + var user = response4[0]; var page = $.mobile.activePage; - var panel = getLibraryMenu(page, counts, items, liveTvInfo); + var panel = getLibraryMenu(page, user, counts, items, liveTvInfo); $(panel).panel('toggle'); }); } - function getLibraryMenu(page, counts, items, liveTvInfo) { + function getLibraryMenu(page, user, counts, items, liveTvInfo) { var panel = $('#libraryPanel', page); @@ -137,7 +138,7 @@ html += '

MEDIABROWSER

'; html += '
'; - html += getViewsHtml(Dashboard.getCurrentUserId(), counts, items, liveTvInfo); + html += getViewsHtml(user, counts, items, liveTvInfo); html += '
'; html += '
'; @@ -247,20 +248,7 @@ renderHeader(page, user); - ensurePromises(); - - $.when(itemCountsPromise, itemsPromise, liveTvInfoPromise).done(function (response1, response2, response3) { - - var counts = response1[0]; - var items = response2[0].Items; - var liveTvInfo = response3[0]; - - var html = getViewsHtml(user.Id, counts, items, liveTvInfo); - $('.desktopLibraryMenu', page).html(html); - - updateLibraryNavLinks(page); - - }); + updateLibraryNavLinks(page); }); } diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js index a805107f7b..f9426deba5 100644 --- a/dashboard-ui/scripts/livetvstatus.js +++ b/dashboard-ui/scripts/livetvstatus.js @@ -241,13 +241,13 @@ pollTasks(page); if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000"); } $(ApiClient).on("websocketmessage", onWebSocketMessage).on('websocketopen', function () { if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000"); } }); diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index 445c7a190c..5199607ca5 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -411,13 +411,13 @@ $(document).on('pageshow', ".mediaLibraryPage", MediaLibraryPage.onPageShow); pollTasks(page); if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000"); } $(ApiClient).on("websocketmessage", onWebSocketMessage).on('websocketopen', function () { if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000"); } }); diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js index 1b9c9d1f08..83765cf7fa 100644 --- a/dashboard-ui/scripts/nowplayingpage.js +++ b/dashboard-ui/scripts/nowplayingpage.js @@ -4,7 +4,7 @@ var lastPlayerState; var isPositionSliderActive; - function showAudioMenu(page, item) { + function showAudioMenu(page, item, currentIndex) { var streams = (item.MediaStreams || []).filter(function (i) { @@ -17,7 +17,13 @@ html += streams.map(function (s) { - var streamHtml = '
  • '; + var streamHtml = '
  • '; + + streamHtml += '

    '; + + if (s.Index == currentIndex) { + streamHtml += ''; + } streamHtml += (s.Codec || '').toUpperCase(); @@ -53,13 +59,15 @@ html += ''; - $('.trackList', elem).html(html).listview('refresh').trigger('create'); + $('.trackList', elem).html(html).trigger('create'); elem.popup('open'); } - function showSubtitleMenu(page, item) { + function showSubtitleMenu(page, item, currentIndex) { + var currentStreamImage = ''; + var streams = (item.MediaStreams || []).filter(function (i) { return i.Type == 'Subtitle'; @@ -67,13 +75,26 @@ var elem = $('#popupSubtitleTrackMenu', page); - var html = '
  • Select Subtitles
  • '; + var html = '
    '; + + $('.trackList', elem).html(html).trigger('create'); elem.popup('open'); } @@ -150,15 +173,19 @@ $('.btnAudioTracks', page).on('click', function () { - if (currentPlayer && lastPlayerState) { - showAudioMenu(page, lastPlayerState.NowPlayingItem); + if (currentPlayer && lastPlayerState && lastPlayerState.PlayState) { + + var currentIndex = lastPlayerState.PlayState.AudioStreamIndex; + showAudioMenu(page, lastPlayerState.NowPlayingItem, currentIndex); } }); $('.btnSubtitles', page).on('click', function () { - if (currentPlayer && lastPlayerState) { - showSubtitleMenu(page, lastPlayerState.NowPlayingItem); + if (currentPlayer && lastPlayerState && lastPlayerState.PlayState) { + + var currentIndex = lastPlayerState.PlayState.SubtitleStreamIndex; + showSubtitleMenu(page, lastPlayerState.NowPlayingItem, currentIndex); } }); diff --git a/dashboard-ui/scripts/scheduledtaskspage.js b/dashboard-ui/scripts/scheduledtaskspage.js index b68019530d..159f791d24 100644 --- a/dashboard-ui/scripts/scheduledtaskspage.js +++ b/dashboard-ui/scripts/scheduledtaskspage.js @@ -1,25 +1,12 @@ (function ($, document, window) { - function reloadList(page, updateInterval) { - - if (updateInterval) { - stopInterval(); - } + function reloadList(page) { ApiClient.getScheduledTasks({isHidden: false}).done(function (tasks) { - if (updateInterval) { - populateList(page, tasks); - } else { - updateTasks(page, tasks); - } + populateList(page, tasks); Dashboard.hideLoadingMsg(); - - if (updateInterval) { - startInterval(); - } - }); } @@ -173,13 +160,15 @@ } } - function onWebSocketConnectionChange() { - reloadList($.mobile.activePage, true); + function onWebSocketConnectionOpen() { + + startInterval(); + reloadList($.mobile.activePage); } function startInterval() { if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1500,1500"); + ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000"); } } @@ -195,9 +184,10 @@ Dashboard.showLoadingMsg(); - reloadList(page, true); + startInterval(); + reloadList(page); - $(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionChange); + $(ApiClient).on("websocketmessage", onWebSocketMessage).on("websocketopen", onWebSocketConnectionOpen); $('#divScheduledTasks', page).on('click', '.btnStartTask', function () { @@ -224,7 +214,7 @@ var page = this; - $(ApiClient).off("websocketmessage", onWebSocketMessage).off("websocketopen", onWebSocketConnectionChange).off("websocketerror", onWebSocketConnectionChange).off("websocketclose", onWebSocketConnectionChange); + $(ApiClient).off("websocketmessage", onWebSocketMessage).off("websocketopen", onWebSocketConnectionOpen); stopInterval(); $('#divScheduledTasks', page).off('click', '.btnStartTask').off('click', '.btnStopTask'); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c601f495a8..776df0f794 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -221,7 +221,7 @@ var Dashboard = { if (!Dashboard.installRefreshInterval) { if (ApiClient.isWebSocketOpen()) { - ApiClient.sendWebSocketMessage("SystemInfoStart", "0,350"); + ApiClient.sendWebSocketMessage("SystemInfoStart", "0,500"); } Dashboard.installRefreshInterval = 1; }