mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update variable declerations
This commit is contained in:
parent
5545c05089
commit
376f00c059
6 changed files with 117 additions and 123 deletions
|
@ -6,12 +6,12 @@ import 'emby-checkbox';
|
|||
/* eslint-disable indent */
|
||||
|
||||
function loadMediaFolders(page, mediaFolders) {
|
||||
var html = '';
|
||||
let html = '';
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderLibraries') + '</h3>';
|
||||
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||
|
||||
for (var i = 0; i < mediaFolders.length; i++) {
|
||||
var folder = mediaFolders[i];
|
||||
for (let i = 0; i < mediaFolders.length; i++) {
|
||||
const folder = mediaFolders[i];
|
||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,12 @@ import 'emby-checkbox';
|
|||
}
|
||||
|
||||
function loadChannels(page, channels) {
|
||||
var html = '';
|
||||
let html = '';
|
||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderChannels') + '</h3>';
|
||||
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||
|
||||
for (var i = 0; i < channels.length; i++) {
|
||||
var folder = channels[i];
|
||||
for (let i = 0; i < channels.length; i++) {
|
||||
const folder = channels[i];
|
||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
||||
}
|
||||
|
||||
|
@ -46,10 +46,10 @@ import 'emby-checkbox';
|
|||
$('#txtUsername', page).val('');
|
||||
$('#txtPassword', page).val('');
|
||||
loading.show();
|
||||
var promiseFolders = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
||||
const promiseFolders = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
||||
IsHidden: false
|
||||
}));
|
||||
var promiseChannels = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
||||
const promiseChannels = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
||||
Promise.all([promiseFolders, promiseChannels]).then(function (responses) {
|
||||
loadMediaFolders(page, responses[0].Items);
|
||||
loadChannels(page, responses[1].Items);
|
||||
|
@ -58,7 +58,7 @@ import 'emby-checkbox';
|
|||
}
|
||||
|
||||
function saveUser(page) {
|
||||
var user = {};
|
||||
const user = {};
|
||||
user.Name = $('#txtUsername', page).val();
|
||||
user.Password = $('#txtPassword', page).val();
|
||||
ApiClient.createUser(user).then(function (user) {
|
||||
|
@ -97,7 +97,7 @@ import 'emby-checkbox';
|
|||
}
|
||||
|
||||
function onSubmit() {
|
||||
var page = $(this).parents('.page')[0];
|
||||
const page = $(this).parents('.page')[0];
|
||||
loading.show();
|
||||
saveUser(page);
|
||||
return false;
|
||||
|
@ -108,7 +108,7 @@ import 'emby-checkbox';
|
|||
}
|
||||
|
||||
$(document).on('pageinit', '#newUserPage', function () {
|
||||
var page = this;
|
||||
const page = this;
|
||||
$('#chkEnableAllChannels', page).on('change', function () {
|
||||
if (this.checked) {
|
||||
$('.channelAccessListContainer', page).hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue