mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update image
This commit is contained in:
parent
7e3d1bd15b
commit
b74ec2c441
3 changed files with 0 additions and 119 deletions
|
@ -82,7 +82,6 @@
|
|||
|
||||
loadUnratedItems(page, user);
|
||||
loadBlockedTags(page, user.Policy.BlockedTags);
|
||||
loadAllowedTags(page, user.Policy.AllowedTags);
|
||||
|
||||
populateRatings(allParentalRatings, page);
|
||||
|
||||
|
@ -147,40 +146,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
function loadAllowedTags(page, tags) {
|
||||
|
||||
var html = '<ul data-role="listview" data-inset="true" data-split-icon="delete">' + tags.map(function (h) {
|
||||
|
||||
var li = '<li>';
|
||||
|
||||
li += '<a href="#">';
|
||||
|
||||
li += '<div style="font-weight:normal;">' + h + '</div>';
|
||||
|
||||
li += '</a>';
|
||||
|
||||
li += '<a class="allowedTag btnDeleteTag" href="#" data-tag="' + h + '"></a>';
|
||||
|
||||
li += '</li>';
|
||||
|
||||
return li;
|
||||
|
||||
}).join('') + '</ul>';
|
||||
|
||||
var elem = $('.allowedTags', page).html(html).trigger('create');
|
||||
|
||||
$('.btnDeleteTag', elem).on('click', function () {
|
||||
|
||||
var tag = this.getAttribute('data-tag');
|
||||
|
||||
var newTags = tags.filter(function (t) {
|
||||
return t != tag;
|
||||
});
|
||||
|
||||
loadAllowedTags(page, newTags);
|
||||
});
|
||||
}
|
||||
|
||||
function deleteAccessSchedule(page, schedules, index) {
|
||||
|
||||
schedules.splice(index, 1);
|
||||
|
@ -245,7 +210,6 @@
|
|||
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
||||
|
||||
user.Policy.BlockedTags = getBlockedTagsFromPage(page);
|
||||
user.Policy.AllowedTags = getAllowedTagsFromPage(page);
|
||||
|
||||
ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () {
|
||||
onSaveComplete(page);
|
||||
|
@ -286,16 +250,6 @@
|
|||
|
||||
saveBlockedTag(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
},
|
||||
|
||||
onAllowedTagFormSubmit: function () {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
saveAllowedTag(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
@ -385,19 +339,6 @@
|
|||
$('#popupBlockedTag', page).popup('close');
|
||||
}
|
||||
|
||||
function saveAllowedTag(page) {
|
||||
|
||||
var tag = $('#txtAllowedTag', page).val();
|
||||
var tags = getAllowedTagsFromPage(page);
|
||||
|
||||
if (tags.indexOf(tag) == -1) {
|
||||
tags.push(tag);
|
||||
loadAllowedTags(page, tags);
|
||||
}
|
||||
|
||||
$('#popupAllowedTag', page).popup('close');
|
||||
}
|
||||
|
||||
function getSchedulesFromPage(page) {
|
||||
|
||||
return $('.liSchedule', page).map(function () {
|
||||
|
@ -420,27 +361,12 @@
|
|||
}).get();
|
||||
}
|
||||
|
||||
function getAllowedTagsFromPage(page) {
|
||||
|
||||
return $('.allowedTag', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-tag');
|
||||
|
||||
}).get();
|
||||
}
|
||||
|
||||
function showBlockedTagPopup(page) {
|
||||
|
||||
$('#popupBlockedTag', page).popup('open');
|
||||
$('#txtBlockedTag', page).val('').focus();
|
||||
}
|
||||
|
||||
function showAllowedTagPopup(page) {
|
||||
|
||||
$('#popupAllowedTag', page).popup('open');
|
||||
$('#txtAllowedTag', page).val('').focus();
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#userParentalControlPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
@ -456,12 +382,6 @@
|
|||
showBlockedTagPopup(page);
|
||||
});
|
||||
|
||||
|
||||
$('.btnAddAllowedTag', page).on('click', function () {
|
||||
|
||||
showAllowedTagPopup(page);
|
||||
});
|
||||
|
||||
populateHours(page);
|
||||
|
||||
}).on('pageshow', "#userParentalControlPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue