mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove unused variables
This commit is contained in:
parent
6a60938b09
commit
f60b7686d0
110 changed files with 242 additions and 277 deletions
|
@ -218,7 +218,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
|
||||
function renderInfo(view, sessions, forceUpdate) {
|
||||
function renderInfo(view, sessions) {
|
||||
sessions = filterSessions(sessions);
|
||||
renderActiveConnections(view, sessions);
|
||||
loading.hide();
|
||||
|
@ -730,7 +730,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onRestartRequired(evt, apiClient) {
|
||||
console.debug('onRestartRequired not implemented', evt, apiClient);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('form').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', loadData);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
}
|
||||
|
||||
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
||||
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
||||
|
||||
|
|
|
@ -48,13 +48,13 @@ import alert from '../../components/alert';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveEncodingPathFailure(response) {
|
||||
function onSaveEncodingPathFailure() {
|
||||
loading.hide();
|
||||
alert(globalize.translate('FFmpegSavePathNotFound'));
|
||||
}
|
||||
|
||||
function updateEncoder(form) {
|
||||
return ApiClient.getSystemInfo().then(function (systemInfo) {
|
||||
return ApiClient.getSystemInfo().then(function () {
|
||||
return ApiClient.ajax({
|
||||
url: ApiClient.getUrl('System/MediaEncoder/Path'),
|
||||
type: 'POST',
|
||||
|
|
|
@ -19,7 +19,6 @@ import alert from '../../components/alert';
|
|||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
|
||||
return '<option value="' + language.Value + '">' + language.Name + '</option>';
|
||||
})).val(config.UICulture);
|
||||
currentLanguage = config.UICulture;
|
||||
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -34,16 +33,11 @@ import alert from '../../components/alert';
|
|||
config.CachePath = form.querySelector('#txtCachePath').value;
|
||||
config.MetadataPath = $('#txtMetadataPath', form).val();
|
||||
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
|
||||
let requiresReload = config.UICulture !== currentLanguage;
|
||||
ApiClient.updateServerConfiguration(config).then(function() {
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
||||
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;
|
||||
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value;
|
||||
|
||||
if (currentBrandingOptions && brandingConfig.CustomCss !== currentBrandingOptions.CustomCss) {
|
||||
requiresReload = true;
|
||||
}
|
||||
|
||||
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
|
@ -56,10 +50,8 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
let currentBrandingOptions;
|
||||
let currentLanguage;
|
||||
const brandingConfigKey = 'branding';
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
||||
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
||||
const picker = new directoryBrowser();
|
||||
|
@ -110,7 +102,6 @@ import alert from '../../components/alert';
|
|||
loadPage(view, responses[0], responses[1], responses[2]);
|
||||
});
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
|
||||
currentBrandingOptions = config;
|
||||
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
|
||||
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function loadData() {
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
||||
|
|
|
@ -6,7 +6,7 @@ import '../../assets/css/flexstyles.scss';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewbeforeshow', function() {
|
||||
loading.show();
|
||||
const apiClient = ApiClient;
|
||||
|
|
|
@ -37,7 +37,7 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
function showConfirmMessage(config) {
|
||||
function showConfirmMessage() {
|
||||
const msg = [];
|
||||
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
||||
alert({
|
||||
|
|
|
@ -131,7 +131,7 @@ import alert from '../../components/alert';
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function loadPage(page, config) {
|
||||
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
|
||||
page.querySelector('#txtPublicPort').value = config.PublicPort;
|
||||
|
@ -198,7 +198,7 @@ import alert from '../../components/alert';
|
|||
});
|
||||
});
|
||||
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
loading.show();
|
||||
ApiClient.getNamedConfiguration('network').then(function (config) {
|
||||
loadPage(view, config);
|
||||
|
|
|
@ -91,7 +91,7 @@ function save(page) {
|
|||
}).map(function (c) {
|
||||
return c.getAttribute('data-itemid');
|
||||
});
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function (r) {
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
Dashboard.navigate('notificationsettings.html');
|
||||
});
|
||||
|
|
|
@ -54,7 +54,7 @@ function reload(page) {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
reload(view);
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ function reloadList(page) {
|
|||
noneElement: page.querySelector('#none'),
|
||||
repositories: repositories
|
||||
});
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error loading repositories');
|
||||
page.querySelector('#none').classList.remove('hide');
|
||||
loading.hide();
|
||||
|
@ -33,9 +33,9 @@ function saveList(page) {
|
|||
url: ApiClient.getUrl('Repositories'),
|
||||
data: JSON.stringify(repositories),
|
||||
contentType: 'application/json'
|
||||
}).then(response => {
|
||||
}).then(() => {
|
||||
reloadList(page);
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error saving repositories');
|
||||
loading.hide();
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ function getTabs() {
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTabs('plugins', 2, getTabs);
|
||||
reloadList(this);
|
||||
|
|
|
@ -207,7 +207,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
return trigger;
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
loading.show();
|
||||
const id = getParameterByName('id');
|
||||
|
|
|
@ -123,7 +123,7 @@ import '../../../elements/emby-button/emby-button';
|
|||
$(elem).parents('.listItem')[0].setAttribute('data-status', state);
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function updateTasks(tasks) {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const task = tasks[i];
|
||||
|
|
|
@ -108,7 +108,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page, user) {
|
||||
function onSaveComplete() {
|
||||
Dashboard.navigate('userprofiles.html');
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
|
|
|
@ -91,7 +91,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ import toast from '../../../components/toast/toast';
|
|||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
||||
});
|
||||
}, function (response) {
|
||||
}, function () {
|
||||
toast(globalize.translate('ErrorDefault'));
|
||||
loading.hide();
|
||||
});
|
||||
|
|
|
@ -161,7 +161,7 @@ import toast from '../../../components/toast/toast';
|
|||
});
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
});
|
||||
}
|
||||
|
||||
function getUserHtml(user, addConnectIndicator) {
|
||||
function getUserHtml(user) {
|
||||
let html = '';
|
||||
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ function reload(context, itemId) {
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
reload(this, MetadataEditor.getCurrentItemId());
|
||||
});
|
||||
|
|
|
@ -817,7 +817,7 @@ class ItemsView {
|
|||
itemsContainer: self.itemsContainer
|
||||
});
|
||||
});
|
||||
view.addEventListener('viewhide', function (e) {
|
||||
view.addEventListener('viewhide', function () {
|
||||
const itemsContainer = self.itemsContainer;
|
||||
|
||||
if (itemsContainer) {
|
||||
|
|
|
@ -104,7 +104,7 @@ export default function (view, params, tabContent) {
|
|||
});
|
||||
}
|
||||
|
||||
function reloadItems(context, save) {
|
||||
function reloadItems(context) {
|
||||
loading.show();
|
||||
isLoading = true;
|
||||
const query = getQuery();
|
||||
|
|
|
@ -64,7 +64,7 @@ function renderRecordingFolders(context, promise) {
|
|||
});
|
||||
}
|
||||
|
||||
function onMoreClick(e) {
|
||||
function onMoreClick() {
|
||||
const type = this.getAttribute('data-type');
|
||||
const serverId = ApiClient.serverId();
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ function addProvider(button) {
|
|||
});
|
||||
}
|
||||
|
||||
function addDevice(button) {
|
||||
function addDevice() {
|
||||
Dashboard.navigate('livetvtuner.html');
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ function submitForm(page) {
|
|||
url: ApiClient.getUrl('LiveTv/TunerHosts'),
|
||||
data: JSON.stringify(info),
|
||||
contentType: 'application/json'
|
||||
}).then(function (result) {
|
||||
}).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
Dashboard.navigate('livetvstatus.html');
|
||||
}, function () {
|
||||
|
|
|
@ -155,7 +155,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
return html;
|
||||
}
|
||||
|
||||
function loadSuggestions(page, userId, parentId) {
|
||||
function loadSuggestions(page, userId) {
|
||||
const screenWidth = dom.getWindowSize().innerWidth;
|
||||
const url = ApiClient.getUrl('Movies/Recommendations', {
|
||||
userId: userId,
|
||||
|
@ -389,7 +389,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
const tabControllers = [];
|
||||
let renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
|
|
@ -185,7 +185,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
});
|
||||
};
|
||||
|
||||
const updateFilterControls = (tabContent) => {
|
||||
const updateFilterControls = () => {
|
||||
const query = getQuery();
|
||||
|
||||
if (this.alphaPicker) {
|
||||
|
|
|
@ -373,7 +373,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
const tabControllers = [];
|
||||
const renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
@ -391,10 +391,10 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
inputManager.off(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
tabControllers.forEach(function (t) {
|
||||
if (t.destroy) {
|
||||
t.destroy();
|
||||
|
|
|
@ -2,17 +2,17 @@ import remotecontrolFactory from '../../../components/remotecontrol/remotecontro
|
|||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
const remoteControl = new remotecontrolFactory();
|
||||
remoteControl.init(view, view.querySelector('.remoteControlContent'));
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
if (remoteControl) {
|
||||
remoteControl.onShow();
|
||||
}
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
|
||||
if (remoteControl) {
|
||||
|
|
|
@ -28,7 +28,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
return document.querySelector('.dialogContainer .dialog.opened');
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function getDisplayItem(item) {
|
||||
if (item.Type === 'TvChannel') {
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
|
@ -431,13 +431,13 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onPlayPauseStateChanged(e) {
|
||||
function onPlayPauseStateChanged() {
|
||||
if (isEnabled) {
|
||||
updatePlayPauseState(this.paused());
|
||||
}
|
||||
}
|
||||
|
||||
function onVolumeChanged(e) {
|
||||
function onVolumeChanged() {
|
||||
if (isEnabled) {
|
||||
const player = this;
|
||||
updatePlayerVolumeState(player, player.isMuted(), player.getVolume());
|
||||
|
@ -472,7 +472,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onMediaStreamsChanged(e) {
|
||||
function onMediaStreamsChanged() {
|
||||
const player = this;
|
||||
const state = playbackManager.getPlayerState(player);
|
||||
onStateChanged.call(player, {
|
||||
|
@ -534,7 +534,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onTimeUpdate(e) {
|
||||
function onTimeUpdate() {
|
||||
// Test for 'currentItem' is required for Firefox since its player spams 'timeupdate' events even being at breakpoint
|
||||
if (isEnabled && currentItem) {
|
||||
const now = new Date().getTime();
|
||||
|
@ -794,7 +794,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function updatePlaylist(player) {
|
||||
function updatePlaylist() {
|
||||
const btnPreviousTrack = view.querySelector('.btnPreviousTrack');
|
||||
const btnNextTrack = view.querySelector('.btnNextTrack');
|
||||
btnPreviousTrack.classList.remove('hide');
|
||||
|
@ -818,7 +818,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
elem.innerHTML = html;
|
||||
}
|
||||
|
||||
function onSettingsButtonClick(e) {
|
||||
function onSettingsButtonClick() {
|
||||
const btn = this;
|
||||
|
||||
import('../../../components/playback/playersettingsmenu').then((playerSettingsMenu) => {
|
||||
|
@ -1261,11 +1261,11 @@ import { appRouter } from '../../../components/appRouter';
|
|||
nowPlayingPositionSlider.classList.add('focusable');
|
||||
}
|
||||
|
||||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
view.addEventListener('viewbeforeshow', function () {
|
||||
headerElement.classList.add('osdHeader');
|
||||
appRouter.setTransparency('full');
|
||||
});
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
try {
|
||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
bindToPlayer(playbackManager.getCurrentPlayer());
|
||||
|
|
|
@ -49,7 +49,7 @@ import ServerConnections from '../../../components/ServerConnections';
|
|||
});
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
|
||||
view.querySelector('.btnCancel').addEventListener('click', goBack);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
ApiClient.ajax({
|
||||
type: 'POST',
|
||||
|
|
|
@ -250,7 +250,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
Dashboard.selectServer();
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
loading.show();
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
|
@ -285,7 +285,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
view.querySelector('.disclaimer').textContent = options.LoginDisclaimer || '';
|
||||
});
|
||||
});
|
||||
view.addEventListener('viewhide', function (e) {
|
||||
view.addEventListener('viewhide', function () {
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
ApiClient.ajax({
|
||||
type: 'POST',
|
||||
|
|
|
@ -354,7 +354,7 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
|
||||
const tabControllers = [];
|
||||
let renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
@ -374,12 +374,12 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
Events.on(ApiClient, 'message', onWebSocketMessage);
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
inputManager.off(window, onInputCommand);
|
||||
Events.off(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
Events.off(ApiClient, 'message', onWebSocketMessage);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
tabControllers.forEach(function (t) {
|
||||
if (t.destroy) {
|
||||
t.destroy();
|
||||
|
|
|
@ -9,7 +9,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
|
||||
export default function (view, params) {
|
||||
let settingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -30,10 +29,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (settingsInstance) {
|
||||
settingsInstance.destroy();
|
||||
|
|
|
@ -10,7 +10,6 @@ import '../../../components/listview/listview.scss';
|
|||
|
||||
export default function (view, params) {
|
||||
let homescreenSettingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -31,10 +30,6 @@ import '../../../components/listview/listview.scss';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (homescreenSettingsInstance) {
|
||||
homescreenSettingsInstance.destroy();
|
||||
|
|
|
@ -11,7 +11,6 @@ import '../../../components/listview/listview.scss';
|
|||
|
||||
export default function (view, params) {
|
||||
let settingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -32,10 +31,6 @@ import '../../../components/listview/listview.scss';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (settingsInstance) {
|
||||
settingsInstance.destroy();
|
||||
|
|
|
@ -54,7 +54,7 @@ function onFileReaderError(evt) {
|
|||
}
|
||||
}
|
||||
|
||||
function onFileReaderAbort(evt) {
|
||||
function onFileReaderAbort() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('FileReadCancelled'));
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ export default function (view, params) {
|
|||
});
|
||||
});
|
||||
});
|
||||
view.querySelector('#btnAddImage').addEventListener('click', function (evt) {
|
||||
view.querySelector('#btnAddImage').addEventListener('click', function () {
|
||||
view.querySelector('#uploadImage').click();
|
||||
});
|
||||
view.querySelector('#uploadImage').addEventListener('change', function (evt) {
|
||||
|
|
|
@ -9,7 +9,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
|
||||
export default function (view, params) {
|
||||
let subtitleSettingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -30,10 +29,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (subtitleSettingsInstance) {
|
||||
subtitleSettingsInstance.destroy();
|
||||
|
|
|
@ -11,6 +11,6 @@ function onFinish() {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.btnWizardNext').addEventListener('click', onFinish);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ function onSubmit(e) {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -75,7 +75,7 @@ function onSubmit(e) {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -32,7 +32,7 @@ function onSubmit() {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
$('.wizardStartForm', view).on('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -58,7 +58,7 @@ function onViewShow() {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardUserForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue