mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
commit
9909d3ee96
@ -171,7 +171,8 @@
|
||||
return c.Id;
|
||||
}).join(','),
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: layoutManager.tv ? "Primary,Backdrop" : "Primary",
|
||||
EnableImages: false,
|
||||
//EnableImageTypes: layoutManager.tv ? "Primary,Backdrop" : "Primary",
|
||||
SortBy: "StartDate",
|
||||
EnableTotalRecordCount: false,
|
||||
EnableUserData: false
|
||||
|
@ -57,7 +57,7 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
statusIcon.classList.remove('status-text-icon');
|
||||
statusIcon.classList.add('zeroProgressStatus');
|
||||
} else if (progress >= 100) {
|
||||
statusIcon.innerHTML = 'file_download';
|
||||
statusIcon.innerHTML = 'check';
|
||||
statusIcon.classList.add('md-icon');
|
||||
statusIcon.classList.remove('status-text-icon');
|
||||
statusIcon.classList.remove('zeroProgressStatus');
|
||||
@ -80,7 +80,7 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
if (progress === 0) {
|
||||
html += '<i class="md-icon listItemIcon statusIcon zeroProgressStatus">file_download</i>';
|
||||
} else if (progress >= 100) {
|
||||
html += '<i class="md-icon listItemIcon statusIcon">file_download</i>';
|
||||
html += '<i class="md-icon listItemIcon statusIcon">check</i>';
|
||||
} else {
|
||||
html += '<i class="listItemIcon statusIcon status-text-icon">' + (Math.round(progress)) + '%</i>';
|
||||
}
|
||||
@ -139,7 +139,8 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
var html = '';
|
||||
var lastTargetName = '';
|
||||
|
||||
var showTargetName = !listInstance.options.isLocalSync;
|
||||
var isLocalSync = listInstance.options.isLocalSync;
|
||||
var showTargetName = !isLocalSync;
|
||||
|
||||
var hasOpenSection = false;
|
||||
|
||||
@ -179,6 +180,15 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
}
|
||||
|
||||
var elem = listInstance.options.element;
|
||||
|
||||
if (!html) {
|
||||
if (isLocalSync) {
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('MessageDownloadsFound') + '</div>';
|
||||
} else {
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('MessageNoSyncJobsFound') + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
|
||||
imageLoader.lazyChildren(elem);
|
||||
|
@ -160,12 +160,12 @@
|
||||
</div>
|
||||
|
||||
<div id="scenesCollapsible" class="detailSection hide">
|
||||
<h1>
|
||||
<div style="display: flex; align-items: center; margin:.5em 0;">
|
||||
<h1 style="margin:0;">
|
||||
${HeaderScenes}
|
||||
<a class="detailSectionHeaderButton chapterSettingsButton clearLink hide" style="margin-top: -8px; display: inline-block;" href="librarysettings.html" title="${ButtonSettings}">
|
||||
<button is="paper-icon-button-light" class="autoSize"><i class="md-icon">settings</i></button>
|
||||
</a>
|
||||
</h1>
|
||||
<button is="paper-icon-button-light" class="chapterSettingsButton hide"><i class="md-icon">settings</i></button>
|
||||
</div>
|
||||
<div id="scenesContent" class="itemsContainer"></div>
|
||||
<button is="emby-button" type="button" class="raised more moreScenes hide">${ButtonMore}</button>
|
||||
</div>
|
||||
|
@ -2229,6 +2229,10 @@
|
||||
|
||||
}
|
||||
|
||||
view.querySelector('.chapterSettingsButton').addEventListener('click', function () {
|
||||
Dashboard.navigate('librarysettings.html');
|
||||
});
|
||||
|
||||
view.addEventListener('viewbeforeshow', function () {
|
||||
var page = this;
|
||||
reload(page, params);
|
||||
|
@ -23,7 +23,7 @@
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('MessagePleaseSelectDeviceToSyncTo'));
|
||||
});
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
var options = {
|
||||
@ -55,9 +55,14 @@
|
||||
|
||||
dialogHelper.close(dlg);
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('MessageSyncJobCreated'));
|
||||
|
||||
var msg = target == ApiClient.deviceId() ? Globalize.translate('MessageDownloadScheduled') : Globalize.translate('MessageSyncJobCreated');
|
||||
|
||||
toast(msg);
|
||||
});
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function setJobValues(job, form) {
|
||||
@ -221,7 +226,7 @@
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
requirejs(["registrationservices", 'dialogHelper', 'formDialogStyle'], function (registrationServices, dialogHelper) {
|
||||
require(["registrationservices", 'dialogHelper', 'formDialogStyle'], function (registrationServices, dialogHelper) {
|
||||
registrationServices.validateFeature('sync').then(function () {
|
||||
|
||||
showSyncMenuInternal(dialogHelper, options).then(resolve, reject);
|
||||
@ -289,10 +294,12 @@
|
||||
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
var submitted = false;
|
||||
|
||||
$('form', dlg).on('submit', function () {
|
||||
|
||||
submitJob(dlg, userId, options, this, dialogHelper);
|
||||
submitted = submitJob(dlg, userId, options, this, dialogHelper);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -308,7 +315,12 @@
|
||||
dialogOptionsFn: getTargetDialogOptionsFn(dialogOptionsQuery)
|
||||
});
|
||||
|
||||
return promise;
|
||||
return promise.then(function () {
|
||||
if (submitted) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['jQuery', 'datetime', 'listViewStyle', 'paper-icon-button-light', 'emby-button'], function ($, datetime) {
|
||||
define(['datetime', 'dom', 'listViewStyle', 'paper-icon-button-light', 'emby-button'], function (datetime, dom) {
|
||||
|
||||
function renderJob(page, job, dialogOptions) {
|
||||
|
||||
@ -119,10 +119,6 @@
|
||||
var elem = page.querySelector('.jobItems');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$('.btnJobItemMenu', elem).on('click', function () {
|
||||
showJobItemMenu(this);
|
||||
});
|
||||
}
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
@ -273,16 +269,36 @@
|
||||
txtSyncJobName.value = job.Name;
|
||||
}
|
||||
|
||||
$('#selectProfile', page).val(job.Profile || '').trigger('change');
|
||||
$('#selectQuality', page).val(job.Quality || '').trigger('change');
|
||||
$('#chkUnwatchedOnly', page).checked(job.UnwatchedOnly);
|
||||
$('#chkSyncNewContent', page).checked(job.SyncNewContent);
|
||||
$('#txtItemLimit', page).val(job.ItemLimit);
|
||||
var selectProfile = page.querySelector('#selectProfile');
|
||||
if (selectProfile) {
|
||||
selectProfile.value = job.Profile || '';
|
||||
}
|
||||
|
||||
var selectQuality = page.querySelector('#selectQuality');
|
||||
if (selectQuality) {
|
||||
selectQuality.value = job.Quality || '';
|
||||
}
|
||||
|
||||
var chkUnwatchedOnly = page.querySelector('#chkUnwatchedOnly');
|
||||
if (chkUnwatchedOnly) {
|
||||
chkUnwatchedOnly.checked = job.UnwatchedOnly;
|
||||
}
|
||||
|
||||
var chkSyncNewContent = page.querySelector('#chkSyncNewContent');
|
||||
if (chkSyncNewContent) {
|
||||
chkSyncNewContent.checked = job.SyncNewContent;
|
||||
}
|
||||
|
||||
var txtItemLimit = page.querySelector('#txtItemLimit');
|
||||
if (txtItemLimit) {
|
||||
txtItemLimit.value = job.ItemLimit;
|
||||
}
|
||||
|
||||
var txtBitrate = page.querySelector('#txtBitrate');
|
||||
if (job.Bitrate) {
|
||||
$('#txtBitrate', page).val(job.Bitrate / 1000000);
|
||||
txtBitrate.value = job.Bitrate / 1000000;
|
||||
} else {
|
||||
$('#txtBitrate', page).val('');
|
||||
txtBitrate.value = '';
|
||||
}
|
||||
|
||||
var target = editOptions.Targets.filter(function (t) {
|
||||
@ -290,7 +306,10 @@
|
||||
})[0];
|
||||
var targetName = target ? target.Name : '';
|
||||
|
||||
$('#selectSyncTarget', page).val(targetName);
|
||||
var selectSyncTarget = page.querySelector('#selectSyncTarget');
|
||||
if (selectSyncTarget) {
|
||||
selectSyncTarget.value = targetName;
|
||||
}
|
||||
}
|
||||
|
||||
var _jobOptions;
|
||||
@ -401,6 +420,13 @@
|
||||
|
||||
}
|
||||
|
||||
view.querySelector('.jobItems').addEventListener('click', function (e) {
|
||||
var btnJobItemMenu = dom.parentWithClass(e.target, 'btnJobItemMenu');
|
||||
if (btnJobItemMenu) {
|
||||
showJobItemMenu(btnJobItemMenu);
|
||||
}
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
var page = this;
|
||||
loadJob(page);
|
||||
|
@ -1582,7 +1582,8 @@
|
||||
"ButtonTakeTheTour": "Take the tour",
|
||||
"HeaderWelcomeBack": "Welcome back!",
|
||||
"ButtonTakeTheTourToSeeWhatsNew": "Take the tour to see what's new",
|
||||
"MessageNoSyncJobsFound": "No sync jobs found. Create sync jobs using the Sync buttons found throughout the web interface.",
|
||||
"MessageNoSyncJobsFound": "No sync jobs found. Create sync jobs using the Sync buttons found throughout the app.",
|
||||
"MessageDownloadsFound": "No offline downloads. Make your media available offline by clicking Make Available Offline throughout the app.",
|
||||
"HeaderSelectDevices": "Select Devices",
|
||||
"ButtonCancelItem": "Cancel item",
|
||||
"ButtonQueueForRetry": "Queue for retry",
|
||||
@ -2315,5 +2316,6 @@
|
||||
"MakeAvailableOffline": "Make available offline",
|
||||
"ConfirmRemoveDownload": "Remove download?",
|
||||
"SyncToOtherDevices": "Sync to other devices",
|
||||
"ManageOfflineDownloads": "Manage offline downloads"
|
||||
"ManageOfflineDownloads": "Manage offline downloads",
|
||||
"MessageDownloadScheduled": "Download scheduled"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user