1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-12-29 14:16:33 -05:00
parent 7c9cbbcd8d
commit d58436bfba
5 changed files with 182 additions and 17 deletions

View file

@ -1,4 +1,4 @@
define(['serverNotifications', 'events', 'loading', 'connectionManager', 'imageLoader', 'dom', 'globalize', 'registrationServices', 'listViewStyle'], function (serverNotifications, events, loading, connectionManager, imageLoader, dom, globalize, registrationServices) {
define(['serverNotifications', 'events', 'loading', 'connectionManager', 'imageLoader', 'dom', 'globalize', 'registrationServices', 'layoutManager', 'listViewStyle'], function (serverNotifications, events, loading, connectionManager, imageLoader, dom, globalize, registrationServices, layoutManager) {
'use strict';
function onSyncJobsUpdated(e, apiClient, data) {
@ -79,7 +79,16 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
var html = '';
html += '<div class="listItem" data-id="' + job.Id + '" data-status="' + job.Status + '">';
var tagName = layoutManager.tv ? 'button' : 'div';
var typeAttribute = tagName === 'button' ? ' type="button"' : '';
var listItemClass = 'listItem';
if (layoutManager.tv) {
listItemClass += ' listItem-button listItem-focusscale';
}
html += '<' + tagName + typeAttribute + ' class="' + listItemClass + '" data-id="' + job.Id + '" data-status="' + job.Status + '">';
var progress = job.Progress || 0;
@ -126,9 +135,11 @@ globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
html += '</div>';
html += '<button type="button" is="paper-icon-button-light" class="btnJobMenu listItemButton"><i class="md-icon">more_vert</i></button>';
if (!layoutManager.tv) {
html += '<button type="button" is="paper-icon-button-light" class="btnJobMenu listItemButton"><i class="md-icon">more_vert</i></button>';
}
html += '</div>';
html += '</' + tagName + '>';
return html;
}