From dbf4cb3d23147675bc8674daa47334e61878a9b2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 23 Aug 2015 22:08:20 -0400 Subject: [PATCH] added default padding settings --- dashboard-ui/css/librarybrowser.css | 28 ---------------- dashboard-ui/itemdetails.html | 3 +- dashboard-ui/livetv.html | 8 ++--- dashboard-ui/livetvnewrecording.html | 6 ---- dashboard-ui/livetvseriestimer.html | 6 ---- dashboard-ui/livetvsettings.html | 12 +++++++ dashboard-ui/livetvtimer.html | 6 ---- dashboard-ui/scripts/homeupcoming.js | 2 +- dashboard-ui/scripts/itemdetailpage.js | 21 ++++++++++-- dashboard-ui/scripts/librarybrowser.js | 13 ++++++-- dashboard-ui/scripts/livetvitems.js | 2 +- dashboard-ui/scripts/livetvnewrecording.js | 4 --- dashboard-ui/scripts/livetvseriestimer.js | 6 +--- dashboard-ui/scripts/livetvsettings.js | 6 ++++ dashboard-ui/scripts/livetvstatus.js | 4 +-- dashboard-ui/scripts/livetvsuggested.js | 17 ++++++---- dashboard-ui/scripts/livetvtimer.js | 4 --- dashboard-ui/scripts/movies.js | 2 -- dashboard-ui/scripts/moviesrecommended.js | 1 - dashboard-ui/scripts/pluginspage.js | 22 +++++++------ dashboard-ui/scripts/secondaryitems.js | 3 +- dashboard-ui/scripts/site.js | 37 ++++++++++------------ dashboard-ui/scripts/tvshows.js | 6 ++-- dashboard-ui/scripts/tvupcoming.js | 2 +- dashboard-ui/strings/html/server.json | 3 +- 25 files changed, 102 insertions(+), 122 deletions(-) diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 854d583301..e3e6516663 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -611,30 +611,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { margin-left: 1em; } -.itemOverview { - text-overflow: ellipsis; - max-height: 100px; - padding-right: .5em; -} - -.desktopOverview { - min-width: 500px; -} - -.mobileOverview { - display: none; - padding: 0 1em; -} - .empty { margin: 0; } -.mobileGenres { - display: none; - padding: 0 1em; -} - .darkScrollbars ::-webkit-scrollbar { width: 10px; height: 10px; @@ -865,14 +845,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { max-width: 120px; } - .mobileOverview:not(.hide), .mobileGenres { - display: block; - } - - .desktopOverview, .desktopGenres { - display: none; - } - .inlineItemName { font-size: 22px; } diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 75eb3a49df..37cf8ec3ea 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -91,7 +91,7 @@

-

+

@@ -177,6 +177,7 @@
+

diff --git a/dashboard-ui/livetv.html b/dashboard-ui/livetv.html index 4cd6c2684d..3f19b4a2ef 100644 --- a/dashboard-ui/livetv.html +++ b/dashboard-ui/livetv.html @@ -35,12 +35,12 @@

-
+

${HeaderUpcomingPrograms}


-
+

${HeaderUpcomingMovies}

${ButtonMoreItems} @@ -48,7 +48,7 @@

-
+

${HeaderUpcomingSports}

${ButtonMoreItems} @@ -56,7 +56,7 @@

-
+

${HeaderUpcomingForKids}

${ButtonMoreItems} diff --git a/dashboard-ui/livetvnewrecording.html b/dashboard-ui/livetvnewrecording.html index 2c4cf074b3..e545ed0dc5 100644 --- a/dashboard-ui/livetvnewrecording.html +++ b/dashboard-ui/livetvnewrecording.html @@ -58,15 +58,9 @@
  • -
  • - ${OptionPrePaddingRequired} -
  • -
  • - ${OptionPostPaddingRequired} -
  • diff --git a/dashboard-ui/livetvseriestimer.html b/dashboard-ui/livetvseriestimer.html index bf48cc1306..947c217e4a 100644 --- a/dashboard-ui/livetvseriestimer.html +++ b/dashboard-ui/livetvseriestimer.html @@ -53,15 +53,9 @@
  • -
  • - ${OptionPrePaddingRequired} -
  • -
  • - ${OptionPostPaddingRequired} -
  • diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index 9805222ba2..edfb180a00 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -58,6 +58,18 @@


    +
    +

    ${HeaderDefaultPadding}

    +
    + +
    +
    + +
    + +
    +
    +
    diff --git a/dashboard-ui/scripts/homeupcoming.js b/dashboard-ui/scripts/homeupcoming.js index d0114b28bf..82000780a0 100644 --- a/dashboard-ui/scripts/homeupcoming.js +++ b/dashboard-ui/scripts/homeupcoming.js @@ -77,7 +77,7 @@ } currentGroupName = dateText; - currentGroup = []; + currentGroup = [item]; } else { currentGroup.push(item); } diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 8ef038928a..d0bc777f01 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -250,6 +250,11 @@ LibraryBrowser.renderDetailImage(page.querySelector('.detailImageContainer'), item, imageHref); } + function refreshImage(page, item, user) { + + LibraryBrowser.refreshDetailImageUserData(page.querySelector('.detailImageContainer'), item); + } + function onWebSocketMessage(e, data) { var msg = data; @@ -272,7 +277,7 @@ Dashboard.getCurrentUser().done(function (user) { - renderImage(page, currentItem, user); + refreshImage(page, currentItem, user); }); } } @@ -401,7 +406,18 @@ $('.tagline', page).hide(); } - LibraryBrowser.renderOverview(page.querySelectorAll('.itemOverview'), item); + var topOverview = page.querySelector('.topOverview'); + var bottomOverview = page.querySelector('.bottomOverview'); + + if (item.Type == 'MusicAlbum' || item.Type == 'MusicArtist') { + LibraryBrowser.renderOverview([bottomOverview], item); + topOverview.classList.add('hide'); + bottomOverview.classList.remove('hide'); + } else { + LibraryBrowser.renderOverview([topOverview], item); + topOverview.classList.remove('hide'); + bottomOverview.classList.add('hide'); + } $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)); @@ -830,7 +846,6 @@ showTitle: false, centerText: true, context: context, - overlayText: true, lazy: true }); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index d02bee3e0f..2abd6ff778 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -2890,11 +2890,11 @@ var progressHtml = item.IsFolder || !item.UserData ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + html += '
    '; if (progressHtml) { - html += '
    '; html += progressHtml; - html += "
    "; } + html += "
    "; html += "
    "; @@ -2918,6 +2918,15 @@ ImageLoader.lazyChildren(elem); }, + refreshDetailImageUserData: function (elem, item) { + + var progressHtml = item.IsFolder || !item.UserData ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData)); + + var detailImageProgressContainer = elem.querySelector('.detailImageProgressContainer'); + + detailImageProgressContainer.innerHTML = progressHtml || ''; + }, + getDisplayTime: function (date) { if ((typeof date).toString().toLowerCase() === 'string') { diff --git a/dashboard-ui/scripts/livetvitems.js b/dashboard-ui/scripts/livetvitems.js index 1b3ffd0540..8ae26a832d 100644 --- a/dashboard-ui/scripts/livetvitems.js +++ b/dashboard-ui/scripts/livetvitems.js @@ -50,7 +50,7 @@ if (view == "Poster") { html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "auto", + shape: query.IsMovie ? 'portrait' : "auto", context: 'livetv', showTitle: false, centerText: true, diff --git a/dashboard-ui/scripts/livetvnewrecording.js b/dashboard-ui/scripts/livetvnewrecording.js index 38f1193e1b..753874b1ac 100644 --- a/dashboard-ui/scripts/livetvnewrecording.js +++ b/dashboard-ui/scripts/livetvnewrecording.js @@ -63,8 +63,6 @@ $('#txtPrePaddingMinutes', page).val(defaultTimer.PrePaddingSeconds / 60); $('#txtPostPaddingMinutes', page).val(defaultTimer.PostPaddingSeconds / 60); - $('#chkPrePaddingRequired', page).checked(defaultTimer.IsPrePaddingRequired); - $('#chkPostPaddingRequired', page).checked(defaultTimer.IsPostPaddingRequired); if (program.IsSeries) { $('#eligibleForSeriesFields', page).show(); @@ -148,8 +146,6 @@ item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; - item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked(); - item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked(); item.RecordNewOnly = $('#chkNewOnly', form).checked(); item.RecordAnyChannel = $('#chkAllChannels', form).checked(); diff --git a/dashboard-ui/scripts/livetvseriestimer.js b/dashboard-ui/scripts/livetvseriestimer.js index acba6e459b..857e5bc4c6 100644 --- a/dashboard-ui/scripts/livetvseriestimer.js +++ b/dashboard-ui/scripts/livetvseriestimer.js @@ -29,8 +29,6 @@ $('#txtPrePaddingMinutes', page).val(item.PrePaddingSeconds / 60); $('#txtPostPaddingMinutes', page).val(item.PostPaddingSeconds / 60); - $('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired); - $('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired); $('#chkNewOnly', page).checked(item.RecordNewOnly); $('#chkAllChannels', page).checked(item.RecordAnyChannel); @@ -109,8 +107,6 @@ item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; - item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked(); - item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked(); item.RecordNewOnly = $('#chkNewOnly', form).checked(); item.RecordAnyChannel = $('#chkAllChannels', form).checked(); @@ -135,7 +131,7 @@ items: result.Items, shape: "detailPageSquare", showTitle: true, - overlayText: true, + centerText: true, coverImage: true })); diff --git a/dashboard-ui/scripts/livetvsettings.js b/dashboard-ui/scripts/livetvsettings.js index 875fcf14ed..09ed4d3707 100644 --- a/dashboard-ui/scripts/livetvsettings.js +++ b/dashboard-ui/scripts/livetvsettings.js @@ -12,6 +12,9 @@ $('#txtRecordingPath', page).val(config.RecordingPath || ''); + $('#txtPrePaddingMinutes', page).val(config.PrePaddingSeconds / 60); + $('#txtPostPaddingMinutes', page).val(config.PostPaddingSeconds / 60); + Dashboard.hideLoadingMsg(); } @@ -28,6 +31,9 @@ config.EnableAutoOrganize = $('#chkOrganize', form).checked(); config.RecordingPath = $('#txtRecordingPath', form).val() || null; + config.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; + config.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; + ApiClient.updateNamedConfiguration("livetv", config).done(Dashboard.processServerConfigurationUpdateResult); }); diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js index 8c048fd653..4dcb499fd8 100644 --- a/dashboard-ui/scripts/livetvstatus.js +++ b/dashboard-ui/scripts/livetvstatus.js @@ -360,7 +360,7 @@ switch (providerId) { case 'm3u': - return 'M3U'; + return 'M3U Playlist'; case 'hdhomerun': return 'HDHomerun'; default: @@ -436,7 +436,7 @@ }); menuItems.push({ - name: 'M3U', + name: getTunerName('m3u'), id: 'm3u' }); diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index e63ce499c8..50a503b76a 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -19,7 +19,7 @@ shape: "auto", showTitle: true, showParentTitle: true, - overlayText: true, + centerText: true, coverImage: true, lazy: true, overlayPlayButton: true @@ -58,7 +58,7 @@ shape: "auto", showTitle: true, showParentTitle: true, - overlayText: true, + centerText: true, coverImage: true, lazy: true, overlayMoreButton: true @@ -75,15 +75,16 @@ userId: Dashboard.getCurrentUserId(), IsAiring: false, HasAired: false, - limit: 8, + limit: 9, IsMovie: true }).done(function (result) { var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "auto", - showTitle: false, + shape: "portrait", + showTitle: true, + centerText: true, coverImage: true, overlayText: false, lazy: true, @@ -108,7 +109,8 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, shape: "auto", - showTitle: false, + showTitle: true, + centerText: true, coverImage: true, overlayText: false, lazy: true, @@ -133,7 +135,8 @@ var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, shape: "auto", - showTitle: false, + showTitle: true, + centerText: true, coverImage: true, overlayText: false, lazy: true, diff --git a/dashboard-ui/scripts/livetvtimer.js b/dashboard-ui/scripts/livetvtimer.js index 514e29d3ba..e0e344ee46 100644 --- a/dashboard-ui/scripts/livetvtimer.js +++ b/dashboard-ui/scripts/livetvtimer.js @@ -56,8 +56,6 @@ $('#txtPrePaddingMinutes', page).val(item.PrePaddingSeconds / 60); $('#txtPostPaddingMinutes', page).val(item.PostPaddingSeconds / 60); - $('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired); - $('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired); if (item.Status == 'New') { $('.timerStatus', page).hide(); @@ -78,8 +76,6 @@ item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; - item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked(); - item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked(); ApiClient.updateLiveTvTimer(item).done(function () { Dashboard.hideLoadingMsg(); diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 1888b866c7..f8772034de 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -76,7 +76,6 @@ shape: "backdrop", preferThumb: true, lazy: true, - overlayText: true, showDetailsMenu: true }); } @@ -117,7 +116,6 @@ shape: "portrait", centerText: true, lazy: true, - overlayText: true, showDetailsMenu: true }); } diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index 5f4542d59f..fc9abf1a36 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -191,7 +191,6 @@ shape: getPortraitShape(), centerText: true, lazy: true, - overlayText: true, showDetailsMenu: true }); } diff --git a/dashboard-ui/scripts/pluginspage.js b/dashboard-ui/scripts/pluginspage.js index 8e7e242d07..7d6de5216d 100644 --- a/dashboard-ui/scripts/pluginspage.js +++ b/dashboard-ui/scripts/pluginspage.js @@ -108,16 +108,16 @@ return html; } - function renderPlugins(page, plugins) { + function renderPlugins(page, plugins, showNoPluginsMessage) { ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration").done(function (configPages) { - populateList(page, plugins, configPages); + populateList(page, plugins, configPages, showNoPluginsMessage); }); } - function populateList(page, plugins, pluginConfigurationPages) { + function populateList(page, plugins, pluginConfigurationPages, showNoPluginsMessage) { plugins = plugins.sort(function (plugin1, plugin2) { @@ -132,12 +132,14 @@ if (!plugins.length) { - html += '
    '; - html += '

    ' + Globalize.translate('MessageNoPluginsInstalled') + '

    '; - html += '

    '; - html += Globalize.translate('BrowsePluginCatalogMessage'); - html += '

    '; - html += '
    '; + if (showNoPluginsMessage) { + html += '
    '; + html += '

    ' + Globalize.translate('MessageNoPluginsInstalled') + '

    '; + html += '

    '; + html += Globalize.translate('BrowsePluginCatalogMessage'); + html += '

    '; + html += '
    '; + } $('.installedPlugins', page).html(html).trigger('create'); } else { @@ -213,7 +215,7 @@ ApiClient.getInstalledPlugins().done(function (plugins) { - renderPlugins(page, plugins); + renderPlugins(page, plugins, true); }); } diff --git a/dashboard-ui/scripts/secondaryitems.js b/dashboard-ui/scripts/secondaryitems.js index 4a72f9af21..8ccd5da6d2 100644 --- a/dashboard-ui/scripts/secondaryitems.js +++ b/dashboard-ui/scripts/secondaryitems.js @@ -121,8 +121,7 @@ items: result.Items, shape: "auto", centerText: true, - lazy: true, - overlayText: true + lazy: true }; if (query.IncludeItemTypes == "MusicAlbum") { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index aaa65a8a29..4fa95efd46 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -483,42 +483,37 @@ var Dashboard = { console.log('showLoadingMsg'); - require(['paperbuttonstyle'], function () { - var elem = document.querySelector('.docspinner'); + var elem = document.querySelector('.docspinner'); - if (elem) { + if (elem) { - // This is just an attempt to prevent the fade-in animation from running repeating and causing flickering - elem.active = true; + // This is just an attempt to prevent the fade-in animation from running repeating and causing flickering + elem.active = true; - } else { + } else { - elem = document.createElement("paper-spinner"); - elem.classList.add('docspinner'); + elem = document.createElement("paper-spinner"); + elem.classList.add('docspinner'); - document.body.appendChild(elem); - elem.active = true; - } - }); + document.body.appendChild(elem); + elem.active = true; + } }, hideLoadingMsg: function () { console.log('hideLoadingMsg'); - require(['paperbuttonstyle'], function () { + var elem = document.querySelector('.docspinner'); - var elem = document.querySelector('.docspinner'); + if (elem) { - if (elem) { + elem.active = false; + setTimeout(function () { elem.active = false; - - setTimeout(function () { - elem.active = false; - }, 100); - } - }); + }, 100); + } }, getModalLoadingMsg: function () { diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index f221d51770..084479f308 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -67,8 +67,7 @@ shape: "backdrop", preferThumb: true, context: 'tv', - lazy: true, - overlayText: true + lazy: true }); } @@ -123,8 +122,7 @@ shape: "portrait", context: 'tv', centerText: true, - lazy: true, - overlayText: true + lazy: true }); } diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js index 739aaffcb3..c6888eea4b 100644 --- a/dashboard-ui/scripts/tvupcoming.js +++ b/dashboard-ui/scripts/tvupcoming.js @@ -81,7 +81,7 @@ } currentGroupName = dateText; - currentGroup = []; + currentGroup = [item]; } else { currentGroup.push(item); } diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 296852fd99..a9398d9970 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1532,5 +1532,6 @@ "HeaderSetupTVGuide": "Setup TV Guide", "LabelDataProvider": "Data provider:", "OptionSendRecordingsToAutoOrganize": "Enable Auto-Organize for new recordings", - "OptionSendRecordingsToAutoOrganizeHelp": "New recordings will be sent to the Auto-Organize feature and imported into your media library." + "OptionSendRecordingsToAutoOrganizeHelp": "New recordings will be sent to the Auto-Organize feature and imported into your media library.", + "HeaderDefaultPadding": "Default Padding" }