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:
parent
8b6dc05d64
commit
9e3ca706c4
217 changed files with 8541 additions and 8540 deletions
|
@ -1,18 +1,18 @@
|
|||
define(["loading"], function (loading) {
|
||||
"use strict";
|
||||
define(['loading'], function (loading) {
|
||||
'use strict';
|
||||
|
||||
function onFinish() {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
url: ApiClient.getUrl("Startup/Complete"),
|
||||
type: "POST"
|
||||
url: ApiClient.getUrl('Startup/Complete'),
|
||||
type: 'POST'
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
window.location.href = "index.html";
|
||||
window.location.href = 'index.html';
|
||||
});
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".btnWizardNext").addEventListener("click", onFinish);
|
||||
view.querySelector('.btnWizardNext').addEventListener('click', onFinish);
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loading) {
|
||||
"use strict";
|
||||
define(['loading', 'emby-checkbox', 'emby-button', 'emby-select'], function (loading) {
|
||||
'use strict';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
var config = {};
|
||||
config.EnableRemoteAccess = page.querySelector("#chkRemoteAccess").checked;
|
||||
config.EnableAutomaticPortMapping = page.querySelector("#chkEnableUpnp").checked;
|
||||
config.EnableRemoteAccess = page.querySelector('#chkRemoteAccess').checked;
|
||||
config.EnableAutomaticPortMapping = page.querySelector('#chkEnableUpnp').checked;
|
||||
apiClient.ajax({
|
||||
type: "POST",
|
||||
type: 'POST',
|
||||
data: config,
|
||||
url: apiClient.getUrl("Startup/RemoteAccess")
|
||||
url: apiClient.getUrl('Startup/RemoteAccess')
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
navigateToNextPage();
|
||||
|
@ -18,7 +18,7 @@ define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loa
|
|||
}
|
||||
|
||||
function navigateToNextPage() {
|
||||
Dashboard.navigate("wizardfinish.html");
|
||||
Dashboard.navigate('wizardfinish.html');
|
||||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
|
@ -28,12 +28,12 @@ define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loa
|
|||
}
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".wizardSettingsForm").addEventListener("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
view.addEventListener('viewhide', function () {
|
||||
document.querySelector('.skinHeader').classList.remove('noHomeButtonHeader');
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loading) {
|
||||
"use strict";
|
||||
define(['loading', 'emby-checkbox', 'emby-button', 'emby-select'], function (loading) {
|
||||
'use strict';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
apiClient.getJSON(apiClient.getUrl("Startup/Configuration")).then(function (config) {
|
||||
config.PreferredMetadataLanguage = page.querySelector("#selectLanguage").value;
|
||||
config.MetadataCountryCode = page.querySelector("#selectCountry").value;
|
||||
apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).then(function (config) {
|
||||
config.PreferredMetadataLanguage = page.querySelector('#selectLanguage').value;
|
||||
config.MetadataCountryCode = page.querySelector('#selectCountry').value;
|
||||
apiClient.ajax({
|
||||
type: "POST",
|
||||
type: 'POST',
|
||||
data: config,
|
||||
url: apiClient.getUrl("Startup/Configuration")
|
||||
url: apiClient.getUrl('Startup/Configuration')
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
navigateToNextPage();
|
||||
|
@ -19,41 +19,41 @@ define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loa
|
|||
}
|
||||
|
||||
function populateLanguages(select, languages) {
|
||||
var html = "";
|
||||
var html = '';
|
||||
html += "<option value=''></option>";
|
||||
|
||||
for (var i = 0, length = languages.length; i < length; i++) {
|
||||
var culture = languages[i];
|
||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + '</option>';
|
||||
}
|
||||
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function populateCountries(select, allCountries) {
|
||||
var html = "";
|
||||
var html = '';
|
||||
html += "<option value=''></option>";
|
||||
|
||||
for (var i = 0, length = allCountries.length; i < length; i++) {
|
||||
var culture = allCountries[i];
|
||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
|
||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + '</option>';
|
||||
}
|
||||
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
function reloadData(page, config, cultures, countries) {
|
||||
populateLanguages(page.querySelector("#selectLanguage"), cultures);
|
||||
populateCountries(page.querySelector("#selectCountry"), countries);
|
||||
page.querySelector("#selectLanguage").value = config.PreferredMetadataLanguage;
|
||||
page.querySelector("#selectCountry").value = config.MetadataCountryCode;
|
||||
populateLanguages(page.querySelector('#selectLanguage'), cultures);
|
||||
populateCountries(page.querySelector('#selectCountry'), countries);
|
||||
page.querySelector('#selectLanguage').value = config.PreferredMetadataLanguage;
|
||||
page.querySelector('#selectCountry').value = config.MetadataCountryCode;
|
||||
loading.hide();
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
var promise1 = apiClient.getJSON(apiClient.getUrl("Startup/Configuration"));
|
||||
var promise1 = apiClient.getJSON(apiClient.getUrl('Startup/Configuration'));
|
||||
var promise2 = apiClient.getCultures();
|
||||
var promise3 = apiClient.getCountries();
|
||||
Promise.all([promise1, promise2, promise3]).then(function (responses) {
|
||||
|
@ -62,7 +62,7 @@ define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loa
|
|||
}
|
||||
|
||||
function navigateToNextPage() {
|
||||
Dashboard.navigate("wizardremoteaccess.html");
|
||||
Dashboard.navigate('wizardremoteaccess.html');
|
||||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
|
@ -72,13 +72,13 @@ define(["loading", "emby-checkbox", "emby-button", "emby-select"], function (loa
|
|||
}
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".wizardSettingsForm").addEventListener("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
reload(this);
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
view.addEventListener('viewhide', function () {
|
||||
document.querySelector('.skinHeader').classList.remove('noHomeButtonHeader');
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(["jQuery", "loading", "emby-button", "emby-select"], function ($, loading) {
|
||||
"use strict";
|
||||
define(['jQuery', 'loading', 'emby-button', 'emby-select'], function ($, loading) {
|
||||
'use strict';
|
||||
|
||||
function loadPage(page, config, languageOptions) {
|
||||
$("#selectLocalizationLanguage", page).html(languageOptions.map(function (l) {
|
||||
return '<option value="' + l.Value + '">' + l.Name + "</option>";
|
||||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {
|
||||
return '<option value="' + l.Value + '">' + l.Name + '</option>';
|
||||
})).val(config.UICulture);
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -11,38 +11,38 @@ define(["jQuery", "loading", "emby-button", "emby-select"], function ($, loading
|
|||
function save(page) {
|
||||
loading.show();
|
||||
var apiClient = ApiClient;
|
||||
apiClient.getJSON(apiClient.getUrl("Startup/Configuration")).then(function (config) {
|
||||
config.UICulture = $("#selectLocalizationLanguage", page).val();
|
||||
apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).then(function (config) {
|
||||
config.UICulture = $('#selectLocalizationLanguage', page).val();
|
||||
apiClient.ajax({
|
||||
type: "POST",
|
||||
type: 'POST',
|
||||
data: config,
|
||||
url: apiClient.getUrl("Startup/Configuration")
|
||||
url: apiClient.getUrl('Startup/Configuration')
|
||||
}).then(function () {
|
||||
Dashboard.navigate("wizarduser.html");
|
||||
Dashboard.navigate('wizarduser.html');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
save($(this).parents(".page"));
|
||||
save($(this).parents('.page'));
|
||||
return false;
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
$(".wizardStartForm", view).on("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
$('.wizardStartForm', view).on('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
loading.show();
|
||||
var page = this;
|
||||
var apiClient = ApiClient;
|
||||
var promise1 = apiClient.getJSON(apiClient.getUrl("Startup/Configuration"));
|
||||
var promise2 = apiClient.getJSON(apiClient.getUrl("Localization/Options"));
|
||||
var promise1 = apiClient.getJSON(apiClient.getUrl('Startup/Configuration'));
|
||||
var promise2 = apiClient.getJSON(apiClient.getUrl('Localization/Options'));
|
||||
Promise.all([promise1, promise2]).then(function (responses) {
|
||||
loadPage(page, responses[0], responses[1]);
|
||||
});
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
view.addEventListener('viewhide', function () {
|
||||
document.querySelector('.skinHeader').classList.remove('noHomeButtonHeader');
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "emby-button"], function (loading, globalize) {
|
||||
"use strict";
|
||||
define(['loading', 'globalize', 'dashboardcss', 'emby-input', 'emby-button', 'emby-button'], function (loading, globalize) {
|
||||
'use strict';
|
||||
|
||||
function getApiClient() {
|
||||
return ApiClient;
|
||||
}
|
||||
|
||||
function nextWizardPage() {
|
||||
Dashboard.navigate("wizardlibrary.html");
|
||||
Dashboard.navigate('wizardlibrary.html');
|
||||
}
|
||||
|
||||
function onUpdateUserComplete(result) {
|
||||
console.debug("user update complete: " + result);
|
||||
console.debug('user update complete: ' + result);
|
||||
loading.hide();
|
||||
nextWizardPage();
|
||||
}
|
||||
|
@ -19,21 +19,21 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
|||
loading.show();
|
||||
var apiClient = getApiClient();
|
||||
apiClient.ajax({
|
||||
type: "POST",
|
||||
type: 'POST',
|
||||
data: {
|
||||
Name: form.querySelector("#txtUsername").value,
|
||||
Password: form.querySelector("#txtManualPassword").value
|
||||
Name: form.querySelector('#txtUsername').value,
|
||||
Password: form.querySelector('#txtManualPassword').value
|
||||
},
|
||||
url: apiClient.getUrl("Startup/User")
|
||||
url: apiClient.getUrl('Startup/User')
|
||||
}).then(onUpdateUserComplete);
|
||||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
var form = this;
|
||||
|
||||
if (form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value) {
|
||||
require(["toast"], function (toast) {
|
||||
toast(globalize.translate("PasswordMatchError"));
|
||||
if (form.querySelector('#txtManualPassword').value != form.querySelector('#txtPasswordConfirm').value) {
|
||||
require(['toast'], function (toast) {
|
||||
toast(globalize.translate('PasswordMatchError'));
|
||||
});
|
||||
} else {
|
||||
submit(form);
|
||||
|
@ -47,21 +47,21 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
|||
loading.show();
|
||||
var page = this;
|
||||
var apiClient = getApiClient();
|
||||
apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function (user) {
|
||||
page.querySelector("#txtUsername").value = user.Name || "";
|
||||
page.querySelector("#txtManualPassword").value = user.Password || "";
|
||||
apiClient.getJSON(apiClient.getUrl('Startup/User')).then(function (user) {
|
||||
page.querySelector('#txtUsername').value = user.Name || '';
|
||||
page.querySelector('#txtManualPassword').value = user.Password || '';
|
||||
loading.hide();
|
||||
});
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".wizardUserForm").addEventListener("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
view.querySelector('.wizardUserForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
view.addEventListener('viewhide', function () {
|
||||
document.querySelector('.skinHeader').classList.remove('noHomeButtonHeader');
|
||||
});
|
||||
view.addEventListener("viewshow", onViewShow);
|
||||
view.addEventListener('viewshow', onViewShow);
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue