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

trim polymer usage

This commit is contained in:
Luke Pulverenti 2016-07-02 14:46:05 -04:00
parent 9a9121f349
commit 1f35078440
2 changed files with 36 additions and 24 deletions

View file

@ -728,8 +728,8 @@ emby-collapsible > .style-scope {
} }
.ui-body-a .emby-collapsible-button { .ui-body-a .emby-collapsible-button {
border: 1px solid #ddd; border: 0;
background-color: #f2f2f2; background-color: #e8e8e8;
text-transform: none; text-transform: none;
} }
@ -740,15 +740,14 @@ emby-collapsible > .style-scope {
font-weight: 500; font-weight: 500;
} }
.ui-body-a .emby-collapsible-content { .ui-body-a .emby-collapsible-content, .ui-body-a .collapseContent {
border: 1px solid #ddd; border-width: 0;
border-width: 0 1px 1px 1px;
padding: 1em 1.25em; padding: 1em 1.25em;
background-color: #fff; background-color: #fff;
} }
.ui-body-b .emby-collapsible-button { .ui-body-b .emby-collapsible-button {
border: 1px solid #222; border: 0;
background-color: #333; background-color: #333;
text-transform: none; text-transform: none;
} }
@ -760,10 +759,10 @@ emby-collapsible > .style-scope {
font-weight: 500; font-weight: 500;
} }
.ui-body-b .emby-collapsible-content { .ui-body-b .emby-collapsible-content, .ui-body-b .collapseContent {
border: 1px solid #252525; border-width: 0;
border-width: 0 1px 1px 1px;
padding: 1em 1.25em; padding: 1em 1.25em;
background-color: #222;
} }
#editItemMetadataPage #txtOverview .paper-input-input { #editItemMetadataPage #txtOverview .paper-input-input {

View file

@ -1,4 +1,4 @@
define(['jQuery', 'datetime', 'paper-progress', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light', 'emby-button'], function ($, datetime) { define(['jQuery', 'datetime', 'paper-progress', 'listViewStyle', 'paper-icon-button-light', 'emby-button'], function ($, datetime) {
function renderJob(page, job, dialogOptions) { function renderJob(page, job, dialogOptions) {
@ -41,7 +41,7 @@
var html = ''; var html = '';
html += '<paper-icon-item data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '" data-remove="' + jobItem.IsMarkedForRemoval + '">'; html += '<div class="listItem" data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '" data-remove="' + jobItem.IsMarkedForRemoval + '">';
var hasActions = ['Queued', 'Cancelled', 'Failed', 'ReadyToTransfer', 'Transferring', 'Converting', 'Synced'].indexOf(jobItem.Status) != -1; var hasActions = ['Queued', 'Cancelled', 'Failed', 'ReadyToTransfer', 'Transferring', 'Converting', 'Synced'].indexOf(jobItem.Status) != -1;
@ -58,22 +58,22 @@
} }
if (imgUrl) { if (imgUrl) {
html += '<paper-fab mini class="blue" style="background-image:url(\'' + imgUrl + '\');background-repeat:no-repeat;background-position:center center;background-size: cover;" item-icon></paper-fab>'; html += '<button type="button" is="emby-button" class="blue mini fab autoSize" icon="sync" style="background-image:url(\'' + imgUrl + '\');background-repeat:no-repeat;background-position:center center;background-size: cover;"><i style="visibility:hidden;" class="md-icon">sync</i></button>';
} }
else { else {
html += '<paper-fab mini class="blue" icon="sync" item-icon></paper-fab>'; html += '<button type="button" is="emby-button" class="blue mini fab autoSize" icon="sync"><i class="md-icon">sync</i></button>';
} }
html += '<paper-item-body three-line>'; html += '<div class="listItemBody three-line">';
html += '<div>'; html += '<div>';
html += jobItem.ItemName; html += jobItem.ItemName;
html += '</div>'; html += '</div>';
if (jobItem.Status == 'Failed') { if (jobItem.Status == 'Failed') {
html += '<div secondary style="color:red;">'; html += '<div class="secondary" style="color:red;">';
} else { } else {
html += '<div secondary>'; html += '<div class="secondary">';
} }
html += Globalize.translate('SyncJobItemStatus' + jobItem.Status); html += Globalize.translate('SyncJobItemStatus' + jobItem.Status);
if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) { if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) {
@ -82,11 +82,11 @@
} }
html += '</div>'; html += '</div>';
html += '<div secondary style="padding-top:5px;">'; html += '<div class="secondary" style="padding-top:5px;">';
html += '<paper-progress class="mini" style="width:100%;" value="' + (jobItem.Progress || 0) + '"></paper-progress>'; html += '<paper-progress class="mini" style="width:100%;" value="' + (jobItem.Progress || 0) + '"></paper-progress>';
html += '</div>'; html += '</div>';
html += '</paper-item-body>'; html += '</div>';
if (hasActions) { if (hasActions) {
@ -95,7 +95,7 @@
html += '<button type="button" is="paper-icon-button-light" class="btnJobItemMenu autoSize" disabled><i class="md-icon">' + AppInfo.moreIcon.replace('-', '_') + '</i></button>'; html += '<button type="button" is="paper-icon-button-light" class="btnJobItemMenu autoSize" disabled><i class="md-icon">' + AppInfo.moreIcon.replace('-', '_') + '</i></button>';
} }
html += '</paper-icon-item>'; html += '</div>';
return html; return html;
} }
@ -125,13 +125,26 @@
}); });
} }
function parentWithClass(elem, className) {
while (!elem.classList || !elem.classList.contains(className)) {
elem = elem.parentNode;
if (!elem) {
return null;
}
}
return elem;
}
function showJobItemMenu(elem) { function showJobItemMenu(elem) {
var page = $(elem).parents('.page'); var page = parentWithClass(elem, 'page');
var listItem = $(elem).parents('paper-icon-item'); var listItem = parentWithClass(elem, 'listItem');
var jobItemId = listItem.attr('data-itemid'); var jobItemId = listItem.getAttribute('data-itemid');
var status = listItem.attr('data-status'); var status = listItem.getAttribute('data-status');
var remove = listItem.attr('data-remove').toLowerCase() == 'true'; var remove = listItem.getAttribute('data-remove').toLowerCase() == 'true';
var menuItems = []; var menuItems = [];