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;">' + tagName + '>';
+ if (style == 'fab') {
+
+ var tagName = 'paper-fab';
+ return '<' + tagName + ' title="' + tooltip + '" data-itemid="' + itemId + '" icon="' + icon + '" class="' + btnCssClass + '" onclick="LibraryBrowser.' + method + '(this);return false;">' + tagName + '>';
+ }
+ 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 += '