mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Disallow block padding
This commit is contained in:
parent
454b81a037
commit
5e1b6acffe
126 changed files with 2 additions and 2127 deletions
|
@ -9,7 +9,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
};
|
||||
|
||||
function getUserDataButtonHtml(method, itemId, serverId, buttonCssClass, iconCssClass, icon, tooltip, style) {
|
||||
|
||||
if (style === 'fab-mini') {
|
||||
style = 'fab';
|
||||
buttonCssClass = buttonCssClass ? (buttonCssClass + ' mini') : 'mini';
|
||||
|
@ -34,7 +33,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function onContainerClick(e) {
|
||||
|
||||
var btnUserData = dom.parentWithClass(e.target, 'btnUserData');
|
||||
|
||||
if (!btnUserData) {
|
||||
|
@ -46,7 +44,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function fill(options) {
|
||||
|
||||
var html = getIconsHtml(options);
|
||||
|
||||
if (options.fillMode === 'insertAdjacent') {
|
||||
|
@ -65,7 +62,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function destroy(options) {
|
||||
|
||||
options.element.innerHTML = '';
|
||||
|
||||
dom.removeEventListener(options.element, 'click', onContainerClick, {
|
||||
|
@ -74,7 +70,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function getIconsHtml(options) {
|
||||
|
||||
var item = options.item;
|
||||
var includePlayed = options.includePlayed;
|
||||
var cssClass = options.cssClass;
|
||||
|
@ -114,7 +109,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
|
||||
var tooltipFavorite = globalize.translate('Favorite');
|
||||
if (userData.IsFavorite) {
|
||||
|
||||
html += getUserDataButtonHtml('markFavorite', itemId, serverId, btnCssClass + ' btnUserData btnUserDataOn', iconCssClass, 'favorite', tooltipFavorite, style);
|
||||
} else {
|
||||
html += getUserDataButtonHtml('markFavorite', itemId, serverId, btnCssClass + ' btnUserData', iconCssClass, 'favorite', tooltipFavorite, style);
|
||||
|
@ -124,7 +118,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function markFavorite(link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
var serverId = link.getAttribute('data-serverid');
|
||||
|
||||
|
@ -140,18 +133,14 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function markLike(link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
var serverId = link.getAttribute('data-serverid');
|
||||
|
||||
if (!link.classList.contains('btnUserDataOn')) {
|
||||
|
||||
likes(id, serverId, true);
|
||||
|
||||
link.classList.add('btnUserDataOn');
|
||||
|
||||
} else {
|
||||
|
||||
clearLike(id, serverId);
|
||||
|
||||
link.classList.remove('btnUserDataOn');
|
||||
|
@ -161,18 +150,14 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function markDislike(link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
var serverId = link.getAttribute('data-serverid');
|
||||
|
||||
if (!link.classList.contains('btnUserDataOn')) {
|
||||
|
||||
likes(id, serverId, false);
|
||||
|
||||
link.classList.add('btnUserDataOn');
|
||||
|
||||
} else {
|
||||
|
||||
clearLike(id, serverId);
|
||||
|
||||
link.classList.remove('btnUserDataOn');
|
||||
|
@ -182,18 +167,14 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function markPlayed(link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
var serverId = link.getAttribute('data-serverid');
|
||||
|
||||
if (!link.classList.contains('btnUserDataOn')) {
|
||||
|
||||
played(id, serverId, true);
|
||||
|
||||
link.classList.add('btnUserDataOn');
|
||||
|
||||
} else {
|
||||
|
||||
played(id, serverId, false);
|
||||
|
||||
link.classList.remove('btnUserDataOn');
|
||||
|
@ -220,7 +201,6 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
}
|
||||
|
||||
function clearLike(id, serverId) {
|
||||
|
||||
var apiClient = connectionManager.getApiClient(serverId);
|
||||
|
||||
return apiClient.clearUserItemRating(apiClient.getCurrentUserId(), id);
|
||||
|
@ -231,5 +211,4 @@ define(['connectionManager', 'globalize', 'dom', 'itemHelper', 'paper-icon-butto
|
|||
destroy: destroy,
|
||||
getIconsHtml: getIconsHtml
|
||||
};
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue