diff --git a/dashboard-ui/components/remotecontrol.js b/dashboard-ui/components/remotecontrol.js index d5049894cd..5c97493960 100644 --- a/dashboard-ui/components/remotecontrol.js +++ b/dashboard-ui/components/remotecontrol.js @@ -1,4 +1,4 @@ -define(['browser', 'datetime', 'jQuery', 'paper-fab', 'paper-tabs', 'paper-slider', 'paper-icon-button'], function (browser, datetime, $) { +define(['browser', 'datetime', 'jQuery', 'paper-fab', 'paper-tabs', 'paper-slider'], function (browser, datetime, $) { function showSlideshowMenu(context) { require(['scripts/slideshow'], function () { @@ -557,13 +557,13 @@ if (info.isLocalPlayer) { - btnCast.icon = 'cast'; + btnCast.querySelector('iron-icon').icon = 'cast'; btnCast.classList.remove('btnActiveCast'); context.querySelector('.nowPlayingSelectedPlayer').innerHTML = ''; } else { - btnCast.icon = 'cast-connected'; + btnCast.querySelector('iron-icon').icon = 'cast-connected'; btnCast.classList.add('btnActiveCast'); context.querySelector('.nowPlayingSelectedPlayer').innerHTML = info.deviceName || info.name; } diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 93e1cbd5fe..8365802b28 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1236,13 +1236,9 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { padding: 0 .75em 0 .25em; display: flex; align-items: center; + color: #fff; } - .selectionCommandsPanel paper-icon-button { - color: #fff; - vertical-align: middle; - } - .itemSelectionCount { font-size: 28px; vertical-align: middle; diff --git a/dashboard-ui/css/polymer/paper-icon-button-light.css b/dashboard-ui/css/polymer/paper-icon-button-light.css index 9792204979..b183d5967d 100644 --- a/dashboard-ui/css/polymer/paper-icon-button-light.css +++ b/dashboard-ui/css/polymer/paper-icon-button-light.css @@ -1,7 +1,7 @@ [is=paper-icon-button-light] { width: 40px; height: 40px; - padding: .5em; + padding: 8px; } [is=paper-icon-button-light] iron-icon, [is=paper-icon-button-light] img { diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index df378ae204..a4ce61455d 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -1,4 +1,4 @@ -
+
@@ -149,7 +149,9 @@ diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index fddbbcbcf9..cd3a7b9cee 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -1,4 +1,4 @@ -
+
@@ -10,7 +10,7 @@
- +

diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index f1e45087a3..6a32f3f166 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -1,12 +1,12 @@ -
+
- +
- +
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 437886ead6..3494ed52fc 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1150,7 +1150,6 @@ } function renderUserDataIcons(page, item) { - $('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item, true, 'icon-button')); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 4f79628247..2321a39ced 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1482,7 +1482,7 @@ html += ''; html += ''; - html += ''; + html += ''; html += ''; html += LibraryBrowser.getUserDataIconsHtml(item); html += ''; @@ -2323,10 +2323,10 @@ html += ''; if (options.overlayPlayButton && !item.IsPlaceHolder && (item.LocationType != 'Virtual' || !item.MediaType || item.Type == 'Program') && item.Type != 'Person') { - html += '
'; + html += '
'; } if (options.overlayMoreButton) { - html += '
'; + html += '
'; } // cardScalable @@ -2351,7 +2351,7 @@ if (options.cardLayout) { html += '
'; - html += ''; + html += ''; html += "
"; } @@ -2981,23 +2981,23 @@ if (showControls) { - html += ''; - html += '= totalRecordCount ? 'disabled' : '') + '>'; + html += ''; + html += ''; } if (options.addLayoutButton) { - html += ''; + html += ''; } if (options.sortButton) { - html += ''; + html += ''; } if (options.filterButton) { - html += ''; + html += ''; } html += '
'; @@ -3164,10 +3164,13 @@ getUserDataButtonHtml: function (method, itemId, btnCssClass, icon, tooltip, style) { - var tagName = style == 'fab' ? 'paper-fab' : 'paper-icon-button'; - - return '<' + tagName + ' title="' + tooltip + '" data-itemid="' + itemId + '" icon="' + icon + '" class="' + btnCssClass + '" onclick="LibraryBrowser.' + method + '(this);return false;">'; + if (style == 'fab') { + + var tagName = 'paper-fab'; + return '<' + tagName + ' title="' + tooltip + '" data-itemid="' + itemId + '" icon="' + icon + '" class="' + btnCssClass + '" onclick="LibraryBrowser.' + method + '(this);return false;">'; + } + return ''; }, getUserDataIconsHtml: function (item, includePlayed, style) { @@ -3192,22 +3195,6 @@ } } - var tooltipLike = Globalize.translate('TooltipLike'); - var tooltipDislike = Globalize.translate('TooltipDislike'); - - if (typeof userData.Likes == "undefined") { - html += LibraryBrowser.getUserDataButtonHtml('markDislike', itemId, 'btnUserItemRating', 'thumb-down', tooltipDislike, style); - html += LibraryBrowser.getUserDataButtonHtml('markLike', itemId, 'btnUserItemRating', 'thumb-up', tooltipLike, style); - } - else if (userData.Likes) { - html += LibraryBrowser.getUserDataButtonHtml('markDislike', itemId, 'btnUserItemRating', 'thumb-down', tooltipDislike, style); - html += LibraryBrowser.getUserDataButtonHtml('markLike', itemId, 'btnUserItemRating btnUserItemRatingOn', 'thumb-up', tooltipLike, style); - } - else { - html += LibraryBrowser.getUserDataButtonHtml('markDislike', itemId, 'btnUserItemRating btnUserItemRatingOn', 'thumb-down', tooltipDislike, style); - html += LibraryBrowser.getUserDataButtonHtml('markLike', itemId, 'btnUserItemRating', 'thumb-up', tooltipLike, style); - } - var tooltipFavorite = Globalize.translate('TooltipFavorite'); if (userData.IsFavorite) { @@ -3254,56 +3241,6 @@ }); }, - markLike: function (link) { - - // TODO: remove jQuery - require(['jQuery'], function ($) { - var id = link.getAttribute('data-itemid'); - - var $link = $(link); - - if (!$link.hasClass('btnUserItemRatingOn')) { - - ApiClient.updateUserItemRating(Dashboard.getCurrentUserId(), id, true); - - $link.addClass('btnUserItemRatingOn'); - - } else { - - ApiClient.clearUserItemRating(Dashboard.getCurrentUserId(), id); - - $link.removeClass('btnUserItemRatingOn'); - } - - $link.prev().removeClass('btnUserItemRatingOn'); - }); - }, - - markDislike: function (link) { - - // TODO: remove jQuery - require(['jQuery'], function ($) { - var id = link.getAttribute('data-itemid'); - - var $link = $(link); - - if (!$link.hasClass('btnUserItemRatingOn')) { - - ApiClient.updateUserItemRating(Dashboard.getCurrentUserId(), id, false); - - $link.addClass('btnUserItemRatingOn'); - - } else { - - ApiClient.clearUserItemRating(Dashboard.getCurrentUserId(), id); - - $link.removeClass('btnUserItemRatingOn'); - } - - $link.next().removeClass('btnUserItemRatingOn'); - }); - }, - renderDetailImage: function (elem, item, editable, preferThumb) { var imageTags = item.ImageTags || {}; diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 1a824a248b..706b493163 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -149,24 +149,22 @@ html += '
'; - var buttonMargin = isPortrait || isSquare ? "margin:0 4px 0 0;" : "margin:0 10px 0 0;"; - var buttonCount = 0; if (MediaController.canPlay(item)) { var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0; - html += ''; + html += ''; buttonCount++; } if (commands.indexOf('trailer') != -1) { - html += ''; + html += ''; buttonCount++; } - html += ''; + html += ''; buttonCount++; html += '
'; @@ -1057,11 +1055,11 @@ var html = ''; html += '
'; - html += ''; + html += ''; html += ''; html += '
'; - html += ''; + html += ''; selectionCommandsPanel.innerHTML = html; diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index e777b03116..2fa52898f3 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -795,14 +795,14 @@ if (info.isLocalPlayer) { - btnCast.icon = 'cast'; + btnCast.querySelector('iron-icon').icon = 'cast'; btnCast.classList.remove('btnActiveCast'); context.querySelector('.headerSelectedPlayer').innerHTML = ''; } else { - btnCast.icon = 'cast-connected'; + btnCast.querySelector('iron-icon').icon = 'cast-connected'; btnCast.classList.add('btnActiveCast'); context.querySelector('.headerSelectedPlayer').innerHTML = info.deviceName || info.name; } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 5dabfbcf35..d9635c64ea 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1,4 +1,4 @@ -define(['appSettings', 'datetime', 'jQuery', 'scrollStyles'], function (appSettings, datetime, $) { +define(['appSettings', 'datetime', 'jQuery', 'scrollStyles', 'paper-icon-button-light'], function (appSettings, datetime, $) { function createVideoPlayer(self) { @@ -700,17 +700,14 @@ html += ''; html += '
'; - html += ''; - html += ''; + html += ''; + html += ''; // Embedding onclicks due to issues not firing in cordova safari - html += ''; - - html += ''; - - html += ''; - - html += ''; + html += ''; + html += ''; + html += ''; + html += ''; html += '
'; // videoAdvancedControls html += '
'; // videoTopControls @@ -727,26 +724,24 @@ html += '
'; // guide html += '
'; - html += ''; - - html += ''; - html += ''; - - html += ''; + html += ''; + html += ''; + html += ''; + html += ''; html += ''; html += '
--:--
'; - html += ''; - html += ''; + html += ''; + html += ''; html += ''; - html += ''; - html += ''; - html += ''; - //html += ''; + html += ''; + html += ''; + html += ''; + html += '
'; html += '
'; // videoControls diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js index 14e10f4e88..e4fc06e00a 100644 --- a/dashboard-ui/scripts/nowplayingbar.js +++ b/dashboard-ui/scripts/nowplayingbar.js @@ -1,4 +1,4 @@ -define(['datetime', 'jQuery', 'paper-icon-button'], function (datetime, $) { +define(['datetime', 'jQuery', 'paper-icon-button-light'], function (datetime, $) { var currentPlayer; @@ -13,6 +13,7 @@ var pauseButton; var positionSlider; var toggleRepeatButton; + var toggleRepeatButtonIcon; var lastPlayerState; @@ -34,34 +35,33 @@ // The onclicks are needed due to the return false above html += '
'; - html += ''; + html += ''; - html += ''; - html += ''; + html += ''; + html += ''; - html += ''; - - html += ''; + html += ''; + html += ''; html += '
'; html += '
'; html += '
'; - html += ''; - html += ''; + html += ''; + html += ''; html += ''; - html += ''; + html += ''; html += '
'; html += '
'; - html += ''; - html += ''; - html += ''; - html += ''; + html += ''; + html += ''; + html += ''; + html += ''; html += '
'; @@ -212,6 +212,8 @@ } })[0]; + toggleRepeatButtonIcon = toggleRepeatButton.querySelector('iron-icon'); + // Unfortunately this is necessary because the polymer elements might not be ready immediately and there doesn't seem to be an event-driven way to find out when setTimeout(function () { volumeSlider = $('.nowPlayingBarVolumeSlider', elem).on('change', function () { @@ -422,14 +424,14 @@ } if (playState.RepeatMode == 'RepeatAll') { - toggleRepeatButton.icon = "repeat"; + toggleRepeatButtonIcon.icon = "repeat"; toggleRepeatButton.classList.add('repeatActive'); } else if (playState.RepeatMode == 'RepeatOne') { - toggleRepeatButton.icon = "repeat-one"; + toggleRepeatButtonIcon.icon = "repeat-one"; toggleRepeatButton.classList.add('repeatActive'); } else { - toggleRepeatButton.icon = "repeat"; + toggleRepeatButtonIcon.icon = "repeat"; toggleRepeatButton.classList.remove('repeatActive'); } diff --git a/dashboard-ui/scripts/sections.js b/dashboard-ui/scripts/sections.js index d828a65c9f..408b7c7729 100644 --- a/dashboard-ui/scripts/sections.js +++ b/dashboard-ui/scripts/sections.js @@ -1,4 +1,4 @@ -define(['libraryBrowser', 'jQuery', 'appSettings', 'scrollStyles', 'paper-button'], function (LibraryBrowser, $, appSettings) { +define(['libraryBrowser', 'jQuery', 'appSettings', 'scrollStyles', 'paper-button', 'paper-icon-button-light'], function (LibraryBrowser, $, appSettings) { function getUserViews(userId) { @@ -203,7 +203,7 @@ var html = ''; html += '
'; - html += '

Try Emby Theater

'; + html += '

Try Emby Theater

'; var nameText = AppInfo.isNativeApp ? 'Emby Theater' : 'Emby Theater'; html += '

A beautiful app for your TV and large screen tablet. ' + nameText + ' runs on Windows, Xbox One, Google Chrome, FireFox, Microsoft Edge and Opera.

'; @@ -221,7 +221,7 @@ var html = ''; html += '
'; - html += '

Try Emby Premiere

'; + html += '

Try Emby Premiere

'; var learnMoreText = AppInfo.isNativeApp ? '' : 'Learn more'; diff --git a/dashboard-ui/scripts/selectserver.js b/dashboard-ui/scripts/selectserver.js index 01e6bd8102..8b7a53dc35 100644 --- a/dashboard-ui/scripts/selectserver.js +++ b/dashboard-ui/scripts/selectserver.js @@ -1,4 +1,4 @@ -define(['jQuery'], function ($) { +define(['paper-icon-button-light', 'jQuery'], function ($) { function connectToServer(page, server) { @@ -73,7 +73,7 @@ html += ''; if (server.Id) { - html += ''; + html += ''; } html += ''; @@ -275,7 +275,7 @@ html += ''; - html += ''; + html += ''; html += ''; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index d486674205..4dd38a66fc 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2922,7 +2922,7 @@ var AppInfo = {}; defineRoute({ path: '/tv.html', - dependencies: ['paper-tabs', 'paper-checkbox', 'paper-button'], + dependencies: ['paper-tabs', 'paper-checkbox', 'paper-button', 'paper-icon-button-light'], autoFocus: false, controller: 'scripts/tvrecommended' }); diff --git a/dashboard-ui/tv.html b/dashboard-ui/tv.html index 9b4e3217d0..1766628bb8 100644 --- a/dashboard-ui/tv.html +++ b/dashboard-ui/tv.html @@ -69,9 +69,9 @@
- - - + + +
@@ -87,9 +87,9 @@
- - - + + +
@@ -99,7 +99,7 @@
- +