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,10 +1,10 @@
|
|||
define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySettings, userSettings, autoFocuser) {
|
||||
"use strict";
|
||||
define(['displaySettings', 'userSettings', 'autoFocuser'], function (DisplaySettings, userSettings, autoFocuser) {
|
||||
'use strict';
|
||||
|
||||
return function (view, params) {
|
||||
function onBeforeUnload(e) {
|
||||
if (hasChanges) {
|
||||
e.returnValue = "You currently have unsaved changes. Are you sure you wish to leave?";
|
||||
e.returnValue = 'You currently have unsaved changes. Are you sure you wish to leave?';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,8 @@ define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySett
|
|||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new userSettings();
|
||||
view.addEventListener("viewshow", function () {
|
||||
window.addEventListener("beforeunload", onBeforeUnload);
|
||||
view.addEventListener('viewshow', function () {
|
||||
window.addEventListener('beforeunload', onBeforeUnload);
|
||||
|
||||
if (settingsInstance) {
|
||||
settingsInstance.loadData();
|
||||
|
@ -21,7 +21,7 @@ define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySett
|
|||
settingsInstance = new DisplaySettings({
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: userId,
|
||||
element: view.querySelector(".settingsContainer"),
|
||||
element: view.querySelector('.settingsContainer'),
|
||||
userSettings: currentSettings,
|
||||
enableSaveButton: false,
|
||||
enableSaveConfirmation: false,
|
||||
|
@ -29,18 +29,18 @@ define(["displaySettings", "userSettings", "autoFocuser"], function (DisplaySett
|
|||
});
|
||||
}
|
||||
});
|
||||
view.addEventListener("change", function () {
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
view.addEventListener("viewbeforehide", function () {
|
||||
window.removeEventListener("beforeunload", onBeforeUnload);
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
window.removeEventListener('beforeunload', onBeforeUnload);
|
||||
hasChanges = false;
|
||||
|
||||
if (settingsInstance) {
|
||||
settingsInstance.submit();
|
||||
}
|
||||
});
|
||||
view.addEventListener("viewdestroy", function () {
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (settingsInstance) {
|
||||
settingsInstance.destroy();
|
||||
settingsInstance = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue