mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove legacy jquery function from source
This commit is contained in:
parent
ca4001f5b7
commit
739473c0fb
11 changed files with 76 additions and 103 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'fnchecked'], function ($, loading, libraryMenu, globalize) {
|
||||
define(['jQuery', 'loading', 'libraryMenu', 'globalize'], function ($, loading, libraryMenu, globalize) {
|
||||
'use strict';
|
||||
|
||||
function triggerChange(select) {
|
||||
|
@ -47,7 +47,7 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'fnchecked'], function
|
|||
$('.channelAccessContainer', page).hide();
|
||||
}
|
||||
|
||||
$('#chkEnableAllChannels', page).checked(user.Policy.EnableAllChannels).trigger('change');
|
||||
$('#chkEnableAllChannels', page).checked = user.Policy.EnableAllChannels;
|
||||
}
|
||||
|
||||
function loadDevices(page, user, devices) {
|
||||
|
@ -63,7 +63,7 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'fnchecked'], function
|
|||
|
||||
html += '</div>';
|
||||
$('.deviceAccess', page).show().html(html);
|
||||
$('#chkEnableAllDevices', page).checked(user.Policy.EnableAllDevices).trigger('change');
|
||||
$('#chkEnableAllDevices', page).checked = user.Policy.EnableAllDevices;
|
||||
|
||||
if (user.Policy.IsAdministrator) {
|
||||
page.querySelector('.deviceAccessContainer').classList.add('hide');
|
||||
|
@ -90,19 +90,19 @@ define(['jQuery', 'loading', 'libraryMenu', 'globalize', 'fnchecked'], function
|
|||
}
|
||||
|
||||
function saveUser(user, page) {
|
||||
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked();
|
||||
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked;
|
||||
user.Policy.EnabledFolders = user.Policy.EnableAllFolders ? [] : $('.chkFolder', page).get().filter(function (c) {
|
||||
return c.checked;
|
||||
}).map(function (c) {
|
||||
return c.getAttribute('data-id');
|
||||
});
|
||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked;
|
||||
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ? [] : $('.chkChannel', page).get().filter(function (c) {
|
||||
return c.checked;
|
||||
}).map(function (c) {
|
||||
return c.getAttribute('data-id');
|
||||
});
|
||||
user.Policy.EnableAllDevices = $('#chkEnableAllDevices', page).checked();
|
||||
user.Policy.EnableAllDevices = $('#chkEnableAllDevices', page).checked;
|
||||
user.Policy.EnabledDevices = user.Policy.EnableAllDevices ? [] : $('.chkDevice', page).get().filter(function (c) {
|
||||
return c.checked;
|
||||
}).map(function (c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue