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

Force the use of single quotes

This commit is contained in:
MrTimscampi 2020-05-04 12:44:12 +02:00
parent 8b6dc05d64
commit 9e3ca706c4
217 changed files with 8541 additions and 8540 deletions

View file

@ -1,38 +1,38 @@
define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function ($, loading, globalize) {
"use strict";
define(['jQuery', 'loading', 'globalize', 'fnchecked', 'emby-button'], function ($, loading, globalize) {
'use strict';
function loadPage(page, config) {
$(".liveTvSettingsForm", page).show();
$(".noLiveTvServices", page).hide();
$("#selectGuideDays", page).val(config.GuideDays || "");
$("#txtPrePaddingMinutes", page).val(config.PrePaddingSeconds / 60);
$("#txtPostPaddingMinutes", page).val(config.PostPaddingSeconds / 60);
page.querySelector("#txtRecordingPath").value = config.RecordingPath || "";
page.querySelector("#txtMovieRecordingPath").value = config.MovieRecordingPath || "";
page.querySelector("#txtSeriesRecordingPath").value = config.SeriesRecordingPath || "";
page.querySelector("#txtPostProcessor").value = config.RecordingPostProcessor || "";
page.querySelector("#txtPostProcessorArguments").value = config.RecordingPostProcessorArguments || "";
$('.liveTvSettingsForm', page).show();
$('.noLiveTvServices', page).hide();
$('#selectGuideDays', page).val(config.GuideDays || '');
$('#txtPrePaddingMinutes', page).val(config.PrePaddingSeconds / 60);
$('#txtPostPaddingMinutes', page).val(config.PostPaddingSeconds / 60);
page.querySelector('#txtRecordingPath').value = config.RecordingPath || '';
page.querySelector('#txtMovieRecordingPath').value = config.MovieRecordingPath || '';
page.querySelector('#txtSeriesRecordingPath').value = config.SeriesRecordingPath || '';
page.querySelector('#txtPostProcessor').value = config.RecordingPostProcessor || '';
page.querySelector('#txtPostProcessorArguments').value = config.RecordingPostProcessorArguments || '';
loading.hide();
}
function onSubmit() {
loading.show();
var form = this;
ApiClient.getNamedConfiguration("livetv").then(function (config) {
config.GuideDays = $("#selectGuideDays", form).val() || null;
var recordingPath = form.querySelector("#txtRecordingPath").value || null;
var movieRecordingPath = form.querySelector("#txtMovieRecordingPath").value || null;
var seriesRecordingPath = form.querySelector("#txtSeriesRecordingPath").value || null;
ApiClient.getNamedConfiguration('livetv').then(function (config) {
config.GuideDays = $('#selectGuideDays', form).val() || null;
var recordingPath = form.querySelector('#txtRecordingPath').value || null;
var movieRecordingPath = form.querySelector('#txtMovieRecordingPath').value || null;
var seriesRecordingPath = form.querySelector('#txtSeriesRecordingPath').value || null;
var recordingPathChanged = recordingPath != config.RecordingPath || movieRecordingPath != config.MovieRecordingPath || seriesRecordingPath != config.SeriesRecordingPath;
config.RecordingPath = recordingPath;
config.MovieRecordingPath = movieRecordingPath;
config.SeriesRecordingPath = seriesRecordingPath;
config.RecordingEncodingFormat = "mkv";
config.PrePaddingSeconds = 60 * $("#txtPrePaddingMinutes", form).val();
config.PostPaddingSeconds = 60 * $("#txtPostPaddingMinutes", form).val();
config.RecordingPostProcessor = $("#txtPostProcessor", form).val();
config.RecordingPostProcessorArguments = $("#txtPostProcessorArguments", form).val();
ApiClient.updateNamedConfiguration("livetv", config).then(function () {
config.RecordingEncodingFormat = 'mkv';
config.PrePaddingSeconds = 60 * $('#txtPrePaddingMinutes', form).val();
config.PostPaddingSeconds = 60 * $('#txtPostPaddingMinutes', form).val();
config.RecordingPostProcessor = $('#txtPostProcessor', form).val();
config.RecordingPostProcessorArguments = $('#txtPostProcessorArguments', form).val();
ApiClient.updateNamedConfiguration('livetv', config).then(function () {
Dashboard.processServerConfigurationUpdateResult();
showSaveMessage(recordingPathChanged);
});
@ -41,29 +41,29 @@ define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function
}
function showSaveMessage(recordingPathChanged) {
var msg = "";
var msg = '';
if (recordingPathChanged) {
msg += globalize.translate("RecordingPathChangeMessage");
msg += globalize.translate('RecordingPathChangeMessage');
}
if (msg) {
require(["alert"], function (alert) {
require(['alert'], function (alert) {
alert(msg);
});
}
}
$(document).on("pageinit", "#liveTvSettingsPage", function () {
$(document).on('pageinit', '#liveTvSettingsPage', function () {
var page = this;
$(".liveTvSettingsForm").off("submit", onSubmit).on("submit", onSubmit);
$("#btnSelectRecordingPath", page).on("click.selectDirectory", function () {
require(["directorybrowser"], function (directoryBrowser) {
$('.liveTvSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
$('#btnSelectRecordingPath', page).on('click.selectDirectory', function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser();
picker.show({
callback: function (path) {
if (path) {
$("#txtRecordingPath", page).val(path);
$('#txtRecordingPath', page).val(path);
}
picker.close();
@ -72,13 +72,13 @@ define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function
});
});
});
$("#btnSelectMovieRecordingPath", page).on("click.selectDirectory", function () {
require(["directorybrowser"], function (directoryBrowser) {
$('#btnSelectMovieRecordingPath', page).on('click.selectDirectory', function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser();
picker.show({
callback: function (path) {
if (path) {
$("#txtMovieRecordingPath", page).val(path);
$('#txtMovieRecordingPath', page).val(path);
}
picker.close();
@ -87,13 +87,13 @@ define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function
});
});
});
$("#btnSelectSeriesRecordingPath", page).on("click.selectDirectory", function () {
require(["directorybrowser"], function (directoryBrowser) {
$('#btnSelectSeriesRecordingPath', page).on('click.selectDirectory', function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser();
picker.show({
callback: function (path) {
if (path) {
$("#txtSeriesRecordingPath", page).val(path);
$('#txtSeriesRecordingPath', page).val(path);
}
picker.close();
@ -102,14 +102,14 @@ define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function
});
});
});
$("#btnSelectPostProcessorPath", page).on("click.selectDirectory", function () {
require(["directorybrowser"], function (directoryBrowser) {
$('#btnSelectPostProcessorPath', page).on('click.selectDirectory', function () {
require(['directorybrowser'], function (directoryBrowser) {
var picker = new directoryBrowser();
picker.show({
includeFiles: true,
callback: function (path) {
if (path) {
$("#txtPostProcessor", page).val(path);
$('#txtPostProcessor', page).val(path);
}
picker.close();
@ -117,10 +117,10 @@ define(["jQuery", "loading", "globalize", "fnchecked", "emby-button"], function
});
});
});
}).on("pageshow", "#liveTvSettingsPage", function () {
}).on('pageshow', '#liveTvSettingsPage', function () {
loading.show();
var page = this;
ApiClient.getNamedConfiguration("livetv").then(function (config) {
ApiClient.getNamedConfiguration('livetv').then(function (config) {
loadPage(page, config);
});
});