mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
sync updates
This commit is contained in:
parent
cd5a8f06b3
commit
40fc62a233
15 changed files with 95 additions and 95 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
html += '<fieldset data-role="controlgroup">';
|
||||
|
||||
html += '<legend>' + Globalize.translate('HeaderMediaFolders') + '</legend>';
|
||||
html += '<legend>' + Globalize.translate('HeaderLibraries') + '</legend>';
|
||||
|
||||
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
||||
|
||||
|
@ -16,13 +16,15 @@
|
|||
|
||||
var checkedAttribute = ' checked="checked"';
|
||||
|
||||
html += '<input class="chkMediaFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<input class="chkFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
}
|
||||
|
||||
html += '</fieldset>';
|
||||
|
||||
$('.mediaFolderAccess', page).html(html).trigger('create');
|
||||
$('.folderAccess', page).html(html).trigger('create');
|
||||
|
||||
$('#chkEnableAllFolders', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||
}
|
||||
|
||||
function loadChannels(page, channels) {
|
||||
|
@ -83,11 +85,14 @@
|
|||
|
||||
ApiClient.createUser(name).done(function (user) {
|
||||
|
||||
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked();
|
||||
user.Policy.EnabledFolders = user.Policy.EnableAllFolders ?
|
||||
[] :
|
||||
$('.chkFolder:checked', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-id');
|
||||
return this.getAttribute('data-id');
|
||||
|
||||
}).get();
|
||||
}).get();
|
||||
|
||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
||||
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
|
||||
|
@ -142,6 +147,16 @@
|
|||
|
||||
});
|
||||
|
||||
$('#chkEnableAllFolders', page).on('change', function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('.folderAccessListContainer', page).hide();
|
||||
} else {
|
||||
$('.folderAccessListContainer', page).show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}).on('pageshow', "#newUserPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue