1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

rework stub seasons

This commit is contained in:
Luke Pulverenti 2015-01-13 23:20:30 -05:00
parent b0a735dccf
commit dd9184c35a
7 changed files with 23 additions and 135 deletions

View file

@ -678,7 +678,7 @@ var Dashboard = {
}
if (link.divider) {
html += "<div class='sidebarDivider'></div>";
html += "<div class='sidebarDivider ui-bar-inherit'></div>";
}
if (link.href) {

View file

@ -16,7 +16,7 @@
var checkedAttribute = ' checked="checked"';
html += '<input class="chkMediaFolder" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<input class="chkMediaFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<label for="' + id + '">' + folder.Name + '</label>';
}
@ -41,7 +41,7 @@
var checkedAttribute = ' checked="checked"';
html += '<input class="chkChannel" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<input class="chkChannel" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<label for="' + id + '">' + folder.Name + '</label>';
}
@ -83,16 +83,23 @@
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
return this.getAttribute('data-foldername');
return this.getAttribute('data-id');
}).get();
user.Policy.BlockedChannels = $('.chkChannel:not(:checked)', page).map(function () {
var allChannels = $('.chkChannel', page);
var enabledChannels = $('.chkChannel:checked', page).map(function () {
return this.getAttribute('data-foldername');
return this.getAttribute('data-id');
}).get();
user.Policy.EnableAllChannels = enabledChannels.length == allChannels.length;
if (!user.Policy.EnableAllChannels) {
user.Policy.EnabledChannels = enabledChannels;
}
ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () {
Dashboard.navigate("useredit.html?userId=" + user.Id);
});