mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
8119b930e4
commit
cbb6337b41
74 changed files with 2195 additions and 1393 deletions
|
@ -1110,10 +1110,32 @@
|
|||
selectionCommandsPanel.innerHTML = html;
|
||||
|
||||
$('.btnCloseSelectionPanel', selectionCommandsPanel).on('click', hideSelections);
|
||||
$('.btnSelectionPanelOptions', selectionCommandsPanel).on('click', showMenuForSelectedItems);
|
||||
|
||||
var btnSelectionPanelOptions = selectionCommandsPanel.querySelector('.btnSelectionPanelOptions');
|
||||
|
||||
$(btnSelectionPanelOptions).on('click', showMenuForSelectedItems);
|
||||
|
||||
shake(btnSelectionPanelOptions, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function shake(elem, iterations) {
|
||||
var keyframes = [
|
||||
{ transform: 'translate3d(0, 0, 0)', offset: 0 },
|
||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.1 },
|
||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.2 },
|
||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.3 },
|
||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.4 },
|
||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.5 },
|
||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.6 },
|
||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.7 },
|
||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.8 },
|
||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.9 },
|
||||
{ transform: 'translate3d(0, 0, 0)', offset: 1 }];
|
||||
var timing = { duration: 900, iterations: iterations };
|
||||
return elem.animate(keyframes, timing);
|
||||
}
|
||||
|
||||
function showSelections(initialCard) {
|
||||
|
||||
var cards = document.querySelectorAll('.card');
|
||||
|
|
|
@ -240,16 +240,6 @@
|
|||
|
||||
saveSchedule(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
},
|
||||
|
||||
onBlockedTagFormSubmit: function () {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
saveBlockedTag(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
@ -326,19 +316,6 @@
|
|||
$('#popupSchedule', page).popup('close');
|
||||
}
|
||||
|
||||
function saveBlockedTag(page) {
|
||||
|
||||
var tag = $('#txtBlockedTag', page).val();
|
||||
var tags = getBlockedTagsFromPage(page);
|
||||
|
||||
if (tags.indexOf(tag) == -1) {
|
||||
tags.push(tag);
|
||||
loadBlockedTags(page, tags);
|
||||
}
|
||||
|
||||
$('#popupBlockedTag', page).popup('close');
|
||||
}
|
||||
|
||||
function getSchedulesFromPage(page) {
|
||||
|
||||
return $('.liSchedule', page).map(function () {
|
||||
|
@ -363,8 +340,25 @@
|
|||
|
||||
function showBlockedTagPopup(page) {
|
||||
|
||||
$('#popupBlockedTag', page).popup('open');
|
||||
$('#txtBlockedTag', page).val('').focus();
|
||||
require(['prompt'], function (prompt) {
|
||||
|
||||
prompt({
|
||||
text: Globalize.translate('LabelTag:'),
|
||||
title: Globalize.translate('HeaderAddTag'),
|
||||
callback: function(value) {
|
||||
|
||||
if (value) {
|
||||
var tags = getBlockedTagsFromPage(page);
|
||||
|
||||
if (tags.indexOf(value) == -1) {
|
||||
tags.push(value);
|
||||
loadBlockedTags(page, tags);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#userParentalControlPage", function () {
|
||||
|
@ -384,7 +378,6 @@
|
|||
|
||||
populateHours(page);
|
||||
|
||||
$('.blockedTagForm').off('submit', UserParentalControlPage.onBlockedTagFormSubmit).on('submit', UserParentalControlPage.onBlockedTagFormSubmit);
|
||||
$('.scheduleForm').off('submit', UserParentalControlPage.onScheduleFormSubmit).on('submit', UserParentalControlPage.onScheduleFormSubmit);
|
||||
$('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue