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

fix medialibrary.js, lint and convert variable declerations

This commit is contained in:
Cameron 2020-07-09 11:36:54 +01:00
parent e230e05e6e
commit fd21f2198d
4 changed files with 38 additions and 38 deletions

View file

@ -7,11 +7,11 @@ import 'emby-select';
/* eslint-disable indent */
function onSubmit(e) {
var form = this;
var localAddress = form.querySelector('#txtLocalAddress').value;
var enableUpnp = form.querySelector('#chkEnableUpnp').checked;
const form = this;
const localAddress = form.querySelector('#txtLocalAddress').value;
const enableUpnp = form.querySelector('#chkEnableUpnp').checked;
confirmSelections(localAddress, enableUpnp, function () {
var validationResult = getValidationAlert(form);
const validationResult = getValidationAlert(form);
if (validationResult) {
showAlertText(validationResult);
@ -52,7 +52,7 @@ import 'emby-select';
}
function triggerChange(select) {
var evt = document.createEvent('HTMLEvents');
const evt = document.createEvent('HTMLEvents');
evt.initEvent('change', false, true);
select.dispatchEvent(evt);
}
@ -70,8 +70,8 @@ import 'emby-select';
}
function validateHttps(form) {
var certPath = form.querySelector('#txtCertificatePath').value || null;
var httpsEnabled = form.querySelector('#chkEnableHttps').checked;
const certPath = form.querySelector('#txtCertificatePath').value || null;
const httpsEnabled = form.querySelector('#chkEnableHttps').checked;
if (httpsEnabled && !certPath) {
return showAlertText({
@ -116,7 +116,7 @@ import 'emby-select';
page.querySelector('#chkEnableHttps').checked = config.EnableHttps;
page.querySelector('#chkRequireHttps').checked = config.RequireHttps;
page.querySelector('#txtBaseUrl').value = config.BaseUrl || '';
var txtCertificatePath = page.querySelector('#txtCertificatePath');
const txtCertificatePath = page.querySelector('#txtCertificatePath');
txtCertificatePath.value = config.CertificatePath || '';
page.querySelector('#txtCertPassword').value = config.CertificatePassword || '';
page.querySelector('#chkEnableUpnp').checked = config.EnableUPnP;
@ -141,7 +141,7 @@ import 'emby-select';
});
view.querySelector('#btnSelectCertPath').addEventListener('click', function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser();
const picker = new directoryBrowser();
picker.show({
includeFiles: true,
includeDirectories: true,
@ -163,6 +163,6 @@ import 'emby-select';
loadPage(view, config);
});
});
};
}
/* eslint-enable indent */