mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update variable declerations
This commit is contained in:
parent
5545c05089
commit
376f00c059
6 changed files with 117 additions and 123 deletions
|
@ -9,21 +9,19 @@ import globalize from 'globalize';
|
||||||
ApiClient.getJSON(ApiClient.getUrl('Channels', {
|
ApiClient.getJSON(ApiClient.getUrl('Channels', {
|
||||||
SupportsMediaDeletion: true
|
SupportsMediaDeletion: true
|
||||||
})).then(function (channelsResult) {
|
})).then(function (channelsResult) {
|
||||||
var i;
|
let folder;
|
||||||
var length;
|
let isChecked;
|
||||||
var folder;
|
let checkedAttribute;
|
||||||
var isChecked;
|
let html = '';
|
||||||
var checkedAttribute;
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
for (i = 0, length = mediaFolders.length; i < length; i++) {
|
for (let i = 0, length = mediaFolders.length; i < length; i++) {
|
||||||
folder = mediaFolders[i];
|
folder = mediaFolders[i];
|
||||||
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
||||||
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, length = channelsResult.Items.length; i < length; i++) {
|
for (let i = 0, length = channelsResult.Items.length; i < length; i++) {
|
||||||
folder = channelsResult.Items[i];
|
folder = channelsResult.Items[i];
|
||||||
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
isChecked = user.Policy.EnableContentDeletion || -1 != user.Policy.EnableContentDeletionFromFolders.indexOf(folder.Id);
|
||||||
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||||
|
@ -42,9 +40,9 @@ import globalize from 'globalize';
|
||||||
page.querySelector('.fldSelectLoginProvider').classList.add('hide');
|
page.querySelector('.fldSelectLoginProvider').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentProviderId = user.Policy.AuthenticationProviderId;
|
const currentProviderId = user.Policy.AuthenticationProviderId;
|
||||||
page.querySelector('.selectLoginProvider').innerHTML = providers.map(function (provider) {
|
page.querySelector('.selectLoginProvider').innerHTML = providers.map(function (provider) {
|
||||||
var selected = provider.Id === currentProviderId || providers.length < 2 ? ' selected' : '';
|
const selected = provider.Id === currentProviderId || providers.length < 2 ? ' selected' : '';
|
||||||
return '<option value="' + provider.Id + '"' + selected + '>' + provider.Name + '</option>';
|
return '<option value="' + provider.Id + '"' + selected + '>' + provider.Name + '</option>';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -56,15 +54,14 @@ import globalize from 'globalize';
|
||||||
page.querySelector('.fldSelectPasswordResetProvider').classList.add('hide');
|
page.querySelector('.fldSelectPasswordResetProvider').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentProviderId = user.Policy.PasswordResetProviderId;
|
const currentProviderId = user.Policy.PasswordResetProviderId;
|
||||||
page.querySelector('.selectPasswordResetProvider').innerHTML = providers.map(function (provider) {
|
page.querySelector('.selectPasswordResetProvider').innerHTML = providers.map(function (provider) {
|
||||||
var selected = provider.Id === currentProviderId || providers.length < 2 ? ' selected' : '';
|
const selected = provider.Id === currentProviderId || providers.length < 2 ? ' selected' : '';
|
||||||
return '<option value="' + provider.Id + '"' + selected + '>' + provider.Name + '</option>';
|
return '<option value="' + provider.Id + '"' + selected + '>' + provider.Name + '</option>';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadUser(page, user) {
|
function loadUser(page, user) {
|
||||||
currentUser = user;
|
|
||||||
ApiClient.getJSON(ApiClient.getUrl('Auth/Providers')).then(function (providers) {
|
ApiClient.getJSON(ApiClient.getUrl('Auth/Providers')).then(function (providers) {
|
||||||
loadAuthProviders(page, user, providers);
|
loadAuthProviders(page, user, providers);
|
||||||
});
|
});
|
||||||
|
@ -159,7 +156,7 @@ import globalize from 'globalize';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
var page = $(this).parents('.page')[0];
|
const page = $(this).parents('.page')[0];
|
||||||
loading.show();
|
loading.show();
|
||||||
getUser().then(function (result) {
|
getUser().then(function (result) {
|
||||||
saveUser(result, page);
|
saveUser(result, page);
|
||||||
|
@ -168,7 +165,7 @@ import globalize from 'globalize';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUser() {
|
function getUser() {
|
||||||
var userId = getParameterByName('userId');
|
const userId = getParameterByName('userId');
|
||||||
return ApiClient.getUser(userId);
|
return ApiClient.getUser(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,11 +176,10 @@ import globalize from 'globalize';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentUser;
|
|
||||||
$(document).on('pageinit', '#editUserPage', function () {
|
$(document).on('pageinit', '#editUserPage', function () {
|
||||||
$('.editUserProfileForm').off('submit', onSubmit).on('submit', onSubmit);
|
$('.editUserProfileForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
this.querySelector('.sharingHelp').innerHTML = globalize.translate('OptionAllowLinkSharingHelp', 30);
|
this.querySelector('.sharingHelp').innerHTML = globalize.translate('OptionAllowLinkSharingHelp', 30);
|
||||||
var page = this;
|
const page = this;
|
||||||
$('#chkEnableDeleteAllFolders', this).on('change', function () {
|
$('#chkEnableDeleteAllFolders', this).on('change', function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$('.deleteAccess', page).hide();
|
$('.deleteAccess', page).hide();
|
||||||
|
|
|
@ -6,39 +6,39 @@ import globalize from 'globalize';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function triggerChange(select) {
|
function triggerChange(select) {
|
||||||
var evt = document.createEvent('HTMLEvents');
|
const evt = document.createEvent('HTMLEvents');
|
||||||
evt.initEvent('change', false, true);
|
evt.initEvent('change', false, true);
|
||||||
select.dispatchEvent(evt);
|
select.dispatchEvent(evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadMediaFolders(page, user, mediaFolders) {
|
function loadMediaFolders(page, user, mediaFolders) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderLibraries') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderLibraries') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||||
|
|
||||||
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
for (let i = 0, length = mediaFolders.length; i < length; i++) {
|
||||||
var folder = mediaFolders[i];
|
const folder = mediaFolders[i];
|
||||||
var isChecked = user.Policy.EnableAllFolders || -1 != user.Policy.EnabledFolders.indexOf(folder.Id);
|
const isChecked = user.Policy.EnableAllFolders || -1 != user.Policy.EnabledFolders.indexOf(folder.Id);
|
||||||
var checkedAttribute = isChecked ? ' checked="checked"' : '';
|
const checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
page.querySelector('.folderAccess').innerHTML = html;
|
page.querySelector('.folderAccess').innerHTML = html;
|
||||||
var chkEnableAllFolders = page.querySelector('#chkEnableAllFolders');
|
const chkEnableAllFolders = page.querySelector('#chkEnableAllFolders');
|
||||||
chkEnableAllFolders.checked = user.Policy.EnableAllFolders;
|
chkEnableAllFolders.checked = user.Policy.EnableAllFolders;
|
||||||
triggerChange(chkEnableAllFolders);
|
triggerChange(chkEnableAllFolders);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadChannels(page, user, channels) {
|
function loadChannels(page, user, channels) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderChannels') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderChannels') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||||
|
|
||||||
for (var i = 0, length = channels.length; i < length; i++) {
|
for (let i = 0, length = channels.length; i < length; i++) {
|
||||||
var folder = channels[i];
|
const folder = channels[i];
|
||||||
var isChecked = user.Policy.EnableAllChannels || -1 != user.Policy.EnabledChannels.indexOf(folder.Id);
|
const isChecked = user.Policy.EnableAllChannels || -1 != user.Policy.EnabledChannels.indexOf(folder.Id);
|
||||||
var checkedAttribute = isChecked ? ' checked="checked"' : '';
|
const checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '" ' + checkedAttribute + '><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ import globalize from 'globalize';
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadDevices(page, user, devices) {
|
function loadDevices(page, user, devices) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderDevices') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderDevices') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||||
|
|
||||||
for (var i = 0, length = devices.length; i < length; i++) {
|
for (let i = 0, length = devices.length; i < length; i++) {
|
||||||
var device = devices[i];
|
const device = devices[i];
|
||||||
var checkedAttribute = user.Policy.EnableAllDevices || -1 != user.Policy.EnabledDevices.indexOf(device.Id) ? ' checked="checked"' : '';
|
const checkedAttribute = user.Policy.EnableAllDevices || -1 != user.Policy.EnabledDevices.indexOf(device.Id) ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkDevice" data-id="' + device.Id + '" ' + checkedAttribute + '><span>' + device.Name + ' - ' + device.AppName + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkDevice" data-id="' + device.Id + '" ' + checkedAttribute + '><span>' + device.Name + ' - ' + device.AppName + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,9 +120,9 @@ import globalize from 'globalize';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
var page = $(this).parents('.page');
|
const page = $(this).parents('.page');
|
||||||
loading.show();
|
loading.show();
|
||||||
var userId = getParameterByName('userId');
|
const userId = getParameterByName('userId');
|
||||||
ApiClient.getUser(userId).then(function (result) {
|
ApiClient.getUser(userId).then(function (result) {
|
||||||
saveUser(result, page);
|
saveUser(result, page);
|
||||||
});
|
});
|
||||||
|
@ -130,7 +130,7 @@ import globalize from 'globalize';
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', '#userLibraryAccessPage', function () {
|
$(document).on('pageinit', '#userLibraryAccessPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
$('#chkEnableAllDevices', page).on('change', function () {
|
$('#chkEnableAllDevices', page).on('change', function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$('.deviceAccessListContainer', page).hide();
|
$('.deviceAccessListContainer', page).hide();
|
||||||
|
@ -154,27 +154,27 @@ import globalize from 'globalize';
|
||||||
});
|
});
|
||||||
$('.userLibraryAccessForm').off('submit', onSubmit).on('submit', onSubmit);
|
$('.userLibraryAccessForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
}).on('pageshow', '#userLibraryAccessPage', function () {
|
}).on('pageshow', '#userLibraryAccessPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
loading.show();
|
loading.show();
|
||||||
var promise1;
|
let promise1;
|
||||||
var userId = getParameterByName('userId');
|
const userId = getParameterByName('userId');
|
||||||
|
|
||||||
if (userId) {
|
if (userId) {
|
||||||
promise1 = ApiClient.getUser(userId);
|
promise1 = ApiClient.getUser(userId);
|
||||||
} else {
|
} else {
|
||||||
var deferred = $.Deferred();
|
const deferred = $.Deferred();
|
||||||
deferred.resolveWith(null, [{
|
deferred.resolveWith(null, [{
|
||||||
Configuration: {}
|
Configuration: {}
|
||||||
}]);
|
}]);
|
||||||
promise1 = deferred.promise();
|
promise1 = deferred.promise();
|
||||||
}
|
}
|
||||||
|
|
||||||
var promise2 = Dashboard.getCurrentUser();
|
const promise2 = Dashboard.getCurrentUser();
|
||||||
var promise4 = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
const promise4 = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
||||||
IsHidden: false
|
IsHidden: false
|
||||||
}));
|
}));
|
||||||
var promise5 = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
const promise5 = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
||||||
var promise6 = ApiClient.getJSON(ApiClient.getUrl('Devices'));
|
const promise6 = ApiClient.getJSON(ApiClient.getUrl('Devices'));
|
||||||
Promise.all([promise1, promise2, promise4, promise5, promise6]).then(function (responses) {
|
Promise.all([promise1, promise2, promise4, promise5, promise6]).then(function (responses) {
|
||||||
loadUser(page, responses[0], responses[1], responses[2].Items, responses[3].Items, responses[4].Items);
|
loadUser(page, responses[0], responses[1], responses[2].Items, responses[3].Items, responses[4].Items);
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,12 +6,12 @@ import 'emby-checkbox';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function loadMediaFolders(page, mediaFolders) {
|
function loadMediaFolders(page, mediaFolders) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderLibraries') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderLibraries') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||||
|
|
||||||
for (var i = 0; i < mediaFolders.length; i++) {
|
for (let i = 0; i < mediaFolders.length; i++) {
|
||||||
var folder = mediaFolders[i];
|
const folder = mediaFolders[i];
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkFolder" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@ import 'emby-checkbox';
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadChannels(page, channels) {
|
function loadChannels(page, channels) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderChannels') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderChannels') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
html += '<div class="checkboxList paperList" style="padding:.5em 1em;">';
|
||||||
|
|
||||||
for (var i = 0; i < channels.length; i++) {
|
for (let i = 0; i < channels.length; i++) {
|
||||||
var folder = channels[i];
|
const folder = channels[i];
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkChannel" data-id="' + folder.Id + '"/><span>' + folder.Name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,10 +46,10 @@ import 'emby-checkbox';
|
||||||
$('#txtUsername', page).val('');
|
$('#txtUsername', page).val('');
|
||||||
$('#txtPassword', page).val('');
|
$('#txtPassword', page).val('');
|
||||||
loading.show();
|
loading.show();
|
||||||
var promiseFolders = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
const promiseFolders = ApiClient.getJSON(ApiClient.getUrl('Library/MediaFolders', {
|
||||||
IsHidden: false
|
IsHidden: false
|
||||||
}));
|
}));
|
||||||
var promiseChannels = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
const promiseChannels = ApiClient.getJSON(ApiClient.getUrl('Channels'));
|
||||||
Promise.all([promiseFolders, promiseChannels]).then(function (responses) {
|
Promise.all([promiseFolders, promiseChannels]).then(function (responses) {
|
||||||
loadMediaFolders(page, responses[0].Items);
|
loadMediaFolders(page, responses[0].Items);
|
||||||
loadChannels(page, responses[1].Items);
|
loadChannels(page, responses[1].Items);
|
||||||
|
@ -58,7 +58,7 @@ import 'emby-checkbox';
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveUser(page) {
|
function saveUser(page) {
|
||||||
var user = {};
|
const user = {};
|
||||||
user.Name = $('#txtUsername', page).val();
|
user.Name = $('#txtUsername', page).val();
|
||||||
user.Password = $('#txtPassword', page).val();
|
user.Password = $('#txtPassword', page).val();
|
||||||
ApiClient.createUser(user).then(function (user) {
|
ApiClient.createUser(user).then(function (user) {
|
||||||
|
@ -97,7 +97,7 @@ import 'emby-checkbox';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
var page = $(this).parents('.page')[0];
|
const page = $(this).parents('.page')[0];
|
||||||
loading.show();
|
loading.show();
|
||||||
saveUser(page);
|
saveUser(page);
|
||||||
return false;
|
return false;
|
||||||
|
@ -108,7 +108,7 @@ import 'emby-checkbox';
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', '#newUserPage', function () {
|
$(document).on('pageinit', '#newUserPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
$('#chkEnableAllChannels', page).on('change', function () {
|
$('#chkEnableAllChannels', page).on('change', function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$('.channelAccessListContainer', page).hide();
|
$('.channelAccessListContainer', page).hide();
|
||||||
|
|
|
@ -9,16 +9,14 @@ import 'paper-icon-button-light';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function populateRatings(allParentalRatings, page) {
|
function populateRatings(allParentalRatings, page) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += "<option value=''></option>";
|
html += "<option value=''></option>";
|
||||||
var i;
|
let rating;
|
||||||
var length;
|
const ratings = [];
|
||||||
var rating;
|
|
||||||
var ratings = [];
|
|
||||||
|
|
||||||
for (i = 0, length = allParentalRatings.length; i < length; i++) {
|
for (let i = 0, length = allParentalRatings.length; i < length; i++) {
|
||||||
if (rating = allParentalRatings[i], ratings.length) {
|
if (rating = allParentalRatings[i], ratings.length) {
|
||||||
var lastRating = ratings[ratings.length - 1];
|
const lastRating = ratings[ratings.length - 1];
|
||||||
|
|
||||||
if (lastRating.Value === rating.Value) {
|
if (lastRating.Value === rating.Value) {
|
||||||
lastRating.Name += '/' + rating.Name;
|
lastRating.Name += '/' + rating.Name;
|
||||||
|
@ -32,7 +30,7 @@ import 'paper-icon-button-light';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, length = ratings.length; i < length; i++) {
|
for (let i = 0, length = ratings.length; i < length; i++) {
|
||||||
rating = ratings[i];
|
rating = ratings[i];
|
||||||
html += "<option value='" + rating.Value + "'>" + rating.Name + '</option>';
|
html += "<option value='" + rating.Value + "'>" + rating.Name + '</option>';
|
||||||
}
|
}
|
||||||
|
@ -41,7 +39,7 @@ import 'paper-icon-button-light';
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadUnratedItems(page, user) {
|
function loadUnratedItems(page, user) {
|
||||||
var items = [{
|
const items = [{
|
||||||
name: globalize.translate('OptionBlockBooks'),
|
name: globalize.translate('OptionBlockBooks'),
|
||||||
value: 'Book'
|
value: 'Book'
|
||||||
}, {
|
}, {
|
||||||
|
@ -63,13 +61,13 @@ import 'paper-icon-button-light';
|
||||||
name: globalize.translate('OptionBlockTvShows'),
|
name: globalize.translate('OptionBlockTvShows'),
|
||||||
value: 'Series'
|
value: 'Series'
|
||||||
}];
|
}];
|
||||||
var html = '';
|
let html = '';
|
||||||
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderBlockItemsWithNoRating') + '</h3>';
|
html += '<h3 class="checkboxListLabel">' + globalize.translate('HeaderBlockItemsWithNoRating') + '</h3>';
|
||||||
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
html += '<div class="checkboxList paperList checkboxList-paperList">';
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
for (let i = 0, length = items.length; i < length; i++) {
|
||||||
var item = items[i];
|
const item = items[i];
|
||||||
var checkedAttribute = -1 != user.Policy.BlockUnratedItems.indexOf(item.value) ? ' checked="checked"' : '';
|
const checkedAttribute = -1 != user.Policy.BlockUnratedItems.indexOf(item.value) ? ' checked="checked"' : '';
|
||||||
html += '<label><input type="checkbox" is="emby-checkbox" class="chkUnratedItem" data-itemtype="' + item.value + '" type="checkbox"' + checkedAttribute + '><span>' + item.name + '</span></label>';
|
html += '<label><input type="checkbox" is="emby-checkbox" class="chkUnratedItem" data-itemtype="' + item.value + '" type="checkbox"' + checkedAttribute + '><span>' + item.name + '</span></label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,11 +81,11 @@ import 'paper-icon-button-light';
|
||||||
loadUnratedItems(page, user);
|
loadUnratedItems(page, user);
|
||||||
loadBlockedTags(page, user.Policy.BlockedTags);
|
loadBlockedTags(page, user.Policy.BlockedTags);
|
||||||
populateRatings(allParentalRatings, page);
|
populateRatings(allParentalRatings, page);
|
||||||
var ratingValue = '';
|
let ratingValue = '';
|
||||||
|
|
||||||
if (user.Policy.MaxParentalRating) {
|
if (user.Policy.MaxParentalRating) {
|
||||||
for (var i = 0, length = allParentalRatings.length; i < length; i++) {
|
for (let i = 0, length = allParentalRatings.length; i < length; i++) {
|
||||||
var rating = allParentalRatings[i];
|
const rating = allParentalRatings[i];
|
||||||
|
|
||||||
if (user.Policy.MaxParentalRating >= rating.Value) {
|
if (user.Policy.MaxParentalRating >= rating.Value) {
|
||||||
ratingValue = rating.Value;
|
ratingValue = rating.Value;
|
||||||
|
@ -108,8 +106,8 @@ import 'paper-icon-button-light';
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadBlockedTags(page, tags) {
|
function loadBlockedTags(page, tags) {
|
||||||
var html = tags.map(function (h) {
|
let html = tags.map(function (h) {
|
||||||
var li = '<div class="listItem">';
|
let li = '<div class="listItem">';
|
||||||
li += '<div class="listItemBody">';
|
li += '<div class="listItemBody">';
|
||||||
li += '<h3 class="listItemBodyText">';
|
li += '<h3 class="listItemBodyText">';
|
||||||
li += h;
|
li += h;
|
||||||
|
@ -123,10 +121,10 @@ import 'paper-icon-button-light';
|
||||||
html = '<div class="paperList">' + html + '</div>';
|
html = '<div class="paperList">' + html + '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var elem = $('.blockedTags', page).html(html).trigger('create');
|
const elem = $('.blockedTags', page).html(html).trigger('create');
|
||||||
$('.btnDeleteTag', elem).on('click', function () {
|
$('.btnDeleteTag', elem).on('click', function () {
|
||||||
var tag = this.getAttribute('data-tag');
|
const tag = this.getAttribute('data-tag');
|
||||||
var newTags = tags.filter(function (t) {
|
const newTags = tags.filter(function (t) {
|
||||||
return t != tag;
|
return t != tag;
|
||||||
});
|
});
|
||||||
loadBlockedTags(page, newTags);
|
loadBlockedTags(page, newTags);
|
||||||
|
@ -139,10 +137,10 @@ import 'paper-icon-button-light';
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderAccessSchedule(page, schedules) {
|
function renderAccessSchedule(page, schedules) {
|
||||||
var html = '';
|
let html = '';
|
||||||
var index = 0;
|
let index = 0;
|
||||||
html += schedules.map(function (a) {
|
html += schedules.map(function (a) {
|
||||||
var itemHtml = '';
|
let itemHtml = '';
|
||||||
itemHtml += '<div class="liSchedule listItem" data-day="' + a.DayOfWeek + '" data-start="' + a.StartHour + '" data-end="' + a.EndHour + '">';
|
itemHtml += '<div class="liSchedule listItem" data-day="' + a.DayOfWeek + '" data-start="' + a.StartHour + '" data-end="' + a.EndHour + '">';
|
||||||
itemHtml += '<div class="listItemBody two-line">';
|
itemHtml += '<div class="listItemBody two-line">';
|
||||||
itemHtml += '<h3 class="listItemBodyText">';
|
itemHtml += '<h3 class="listItemBodyText">';
|
||||||
|
@ -155,7 +153,7 @@ import 'paper-icon-button-light';
|
||||||
index++;
|
index++;
|
||||||
return itemHtml;
|
return itemHtml;
|
||||||
}).join('');
|
}).join('');
|
||||||
var accessScheduleList = page.querySelector('.accessScheduleList');
|
const accessScheduleList = page.querySelector('.accessScheduleList');
|
||||||
accessScheduleList.innerHTML = html;
|
accessScheduleList.innerHTML = html;
|
||||||
$('.btnDelete', accessScheduleList).on('click', function () {
|
$('.btnDelete', accessScheduleList).on('click', function () {
|
||||||
deleteAccessSchedule(page, schedules, parseInt(this.getAttribute('data-index')));
|
deleteAccessSchedule(page, schedules, parseInt(this.getAttribute('data-index')));
|
||||||
|
@ -185,8 +183,8 @@ import 'paper-icon-button-light';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDisplayTime(hours) {
|
function getDisplayTime(hours) {
|
||||||
var minutes = 0;
|
let minutes = 0;
|
||||||
var pct = hours % 1;
|
const pct = hours % 1;
|
||||||
|
|
||||||
if (pct) {
|
if (pct) {
|
||||||
minutes = parseInt(60 * pct);
|
minutes = parseInt(60 * pct);
|
||||||
|
@ -201,7 +199,7 @@ import 'paper-icon-button-light';
|
||||||
accessschedule.show({
|
accessschedule.show({
|
||||||
schedule: schedule
|
schedule: schedule
|
||||||
}).then(function (updatedSchedule) {
|
}).then(function (updatedSchedule) {
|
||||||
var schedules = getSchedulesFromPage(page);
|
const schedules = getSchedulesFromPage(page);
|
||||||
|
|
||||||
if (-1 == index) {
|
if (-1 == index) {
|
||||||
index = schedules.length;
|
index = schedules.length;
|
||||||
|
@ -234,7 +232,7 @@ import 'paper-icon-button-light';
|
||||||
prompt({
|
prompt({
|
||||||
label: globalize.translate('LabelTag')
|
label: globalize.translate('LabelTag')
|
||||||
}).then(function (value) {
|
}).then(function (value) {
|
||||||
var tags = getBlockedTagsFromPage(page);
|
const tags = getBlockedTagsFromPage(page);
|
||||||
|
|
||||||
if (-1 == tags.indexOf(value)) {
|
if (-1 == tags.indexOf(value)) {
|
||||||
tags.push(value);
|
tags.push(value);
|
||||||
|
@ -246,9 +244,9 @@ import 'paper-icon-button-light';
|
||||||
|
|
||||||
window.UserParentalControlPage = {
|
window.UserParentalControlPage = {
|
||||||
onSubmit: function () {
|
onSubmit: function () {
|
||||||
var page = $(this).parents('.page');
|
const page = $(this).parents('.page');
|
||||||
loading.show();
|
loading.show();
|
||||||
var userId = getParameterByName('userId');
|
const userId = getParameterByName('userId');
|
||||||
ApiClient.getUser(userId).then(function (result) {
|
ApiClient.getUser(userId).then(function (result) {
|
||||||
saveUser(result, page);
|
saveUser(result, page);
|
||||||
});
|
});
|
||||||
|
@ -256,7 +254,7 @@ import 'paper-icon-button-light';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$(document).on('pageinit', '#userParentalControlPage', function () {
|
$(document).on('pageinit', '#userParentalControlPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
$('.btnAddSchedule', page).on('click', function () {
|
$('.btnAddSchedule', page).on('click', function () {
|
||||||
showSchedulePopup(page, {}, -1);
|
showSchedulePopup(page, {}, -1);
|
||||||
});
|
});
|
||||||
|
@ -265,11 +263,11 @@ import 'paper-icon-button-light';
|
||||||
});
|
});
|
||||||
$('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit);
|
$('.userParentalControlForm').off('submit', UserParentalControlPage.onSubmit).on('submit', UserParentalControlPage.onSubmit);
|
||||||
}).on('pageshow', '#userParentalControlPage', function () {
|
}).on('pageshow', '#userParentalControlPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
loading.show();
|
loading.show();
|
||||||
var userId = getParameterByName('userId');
|
const userId = getParameterByName('userId');
|
||||||
var promise1 = ApiClient.getUser(userId);
|
const promise1 = ApiClient.getUser(userId);
|
||||||
var promise2 = ApiClient.getParentalRatings();
|
const promise2 = ApiClient.getParentalRatings();
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
loadUser(page, responses[0], responses[1]);
|
loadUser(page, responses[0], responses[1]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,13 +6,13 @@ import 'emby-button';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function loadUser(page, params) {
|
function loadUser(page, params) {
|
||||||
var userid = params.userId;
|
const userid = params.userId;
|
||||||
ApiClient.getUser(userid).then(function (user) {
|
ApiClient.getUser(userid).then(function (user) {
|
||||||
Dashboard.getCurrentUser().then(function (loggedInUser) {
|
Dashboard.getCurrentUser().then(function (loggedInUser) {
|
||||||
libraryMenu.setTitle(user.Name);
|
libraryMenu.setTitle(user.Name);
|
||||||
page.querySelector('.username').innerHTML = user.Name;
|
page.querySelector('.username').innerHTML = user.Name;
|
||||||
var showPasswordSection = true;
|
let showPasswordSection = true;
|
||||||
var showLocalAccessSection = false;
|
let showLocalAccessSection = false;
|
||||||
|
|
||||||
if ('Guest' == user.ConnectLinkType) {
|
if ('Guest' == user.ConnectLinkType) {
|
||||||
page.querySelector('.localAccessSection').classList.add('hide');
|
page.querySelector('.localAccessSection').classList.add('hide');
|
||||||
|
@ -38,7 +38,7 @@ import 'emby-button';
|
||||||
page.querySelector('.localAccessSection').classList.add('hide');
|
page.querySelector('.localAccessSection').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var txtEasyPassword = page.querySelector('#txtEasyPassword');
|
const txtEasyPassword = page.querySelector('#txtEasyPassword');
|
||||||
txtEasyPassword.value = '';
|
txtEasyPassword.value = '';
|
||||||
|
|
||||||
if (user.HasConfiguredEasyPassword) {
|
if (user.HasConfiguredEasyPassword) {
|
||||||
|
@ -64,8 +64,8 @@ import 'emby-button';
|
||||||
|
|
||||||
export default function (view, params) {
|
export default function (view, params) {
|
||||||
function saveEasyPassword() {
|
function saveEasyPassword() {
|
||||||
var userId = params.userId;
|
const userId = params.userId;
|
||||||
var easyPassword = view.querySelector('#txtEasyPassword').value;
|
const easyPassword = view.querySelector('#txtEasyPassword').value;
|
||||||
|
|
||||||
if (easyPassword) {
|
if (easyPassword) {
|
||||||
ApiClient.updateEasyPassword(userId, easyPassword).then(function () {
|
ApiClient.updateEasyPassword(userId, easyPassword).then(function () {
|
||||||
|
@ -92,9 +92,9 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
function savePassword() {
|
function savePassword() {
|
||||||
var userId = params.userId;
|
const userId = params.userId;
|
||||||
var currentPassword = view.querySelector('#txtCurrentPassword').value;
|
let currentPassword = view.querySelector('#txtCurrentPassword').value;
|
||||||
var newPassword = view.querySelector('#txtNewPassword').value;
|
const newPassword = view.querySelector('#txtNewPassword').value;
|
||||||
|
|
||||||
if (view.querySelector('#fldCurrentPassword').classList.contains('hide')) {
|
if (view.querySelector('#fldCurrentPassword').classList.contains('hide')) {
|
||||||
// Firefox does not respect autocomplete=off, so clear it if the field is supposed to be hidden (and blank)
|
// Firefox does not respect autocomplete=off, so clear it if the field is supposed to be hidden (and blank)
|
||||||
|
@ -120,7 +120,7 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
var form = this;
|
const form = this;
|
||||||
|
|
||||||
if (form.querySelector('#txtNewPassword').value != form.querySelector('#txtNewPasswordConfirm').value) {
|
if (form.querySelector('#txtNewPassword').value != form.querySelector('#txtNewPasswordConfirm').value) {
|
||||||
import('toast').then(({default: toast}) => {
|
import('toast').then(({default: toast}) => {
|
||||||
|
@ -143,10 +143,10 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetPassword() {
|
function resetPassword() {
|
||||||
var msg = globalize.translate('PasswordResetConfirmation');
|
const msg = globalize.translate('PasswordResetConfirmation');
|
||||||
import('confirm').then(({default: confirm}) => {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm(msg, globalize.translate('PasswordResetHeader')).then(function () {
|
confirm(msg, globalize.translate('PasswordResetHeader')).then(function () {
|
||||||
var userId = params.userId;
|
const userId = params.userId;
|
||||||
loading.show();
|
loading.show();
|
||||||
ApiClient.resetUserPassword(userId).then(function () {
|
ApiClient.resetUserPassword(userId).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
@ -161,11 +161,11 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetEasyPassword() {
|
function resetEasyPassword() {
|
||||||
var msg = globalize.translate('PinCodeResetConfirmation');
|
const msg = globalize.translate('PinCodeResetConfirmation');
|
||||||
|
|
||||||
import('confirm').then(({default: confirm}) => {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm(msg, globalize.translate('HeaderPinCodeReset')).then(function () {
|
confirm(msg, globalize.translate('HeaderPinCodeReset')).then(function () {
|
||||||
var userId = params.userId;
|
const userId = params.userId;
|
||||||
loading.show();
|
loading.show();
|
||||||
ApiClient.resetEasyPassword(userId).then(function () {
|
ApiClient.resetEasyPassword(userId).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
|
@ -12,7 +12,7 @@ import 'flexStyles';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function deleteUser(page, id) {
|
function deleteUser(page, id) {
|
||||||
var msg = globalize.translate('DeleteUserConfirmation');
|
const msg = globalize.translate('DeleteUserConfirmation');
|
||||||
|
|
||||||
import('confirm').then(({default: confirm}) => {
|
import('confirm').then(({default: confirm}) => {
|
||||||
confirm({
|
confirm({
|
||||||
|
@ -30,10 +30,10 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function showUserMenu(elem) {
|
function showUserMenu(elem) {
|
||||||
var card = dom.parentWithClass(elem, 'card');
|
const card = dom.parentWithClass(elem, 'card');
|
||||||
var page = dom.parentWithClass(card, 'page');
|
const page = dom.parentWithClass(card, 'page');
|
||||||
var userId = card.getAttribute('data-userid');
|
const userId = card.getAttribute('data-userid');
|
||||||
var menuItems = [];
|
const menuItems = [];
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
name: globalize.translate('ButtonOpen'),
|
name: globalize.translate('ButtonOpen'),
|
||||||
id: 'open',
|
id: 'open',
|
||||||
|
@ -82,8 +82,8 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserHtml(user, addConnectIndicator) {
|
function getUserHtml(user, addConnectIndicator) {
|
||||||
var html = '';
|
let html = '';
|
||||||
var cssClass = 'card squareCard scalableCard squareCard-scalable';
|
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||||
|
|
||||||
if (user.Policy.IsDisabled) {
|
if (user.Policy.IsDisabled) {
|
||||||
cssClass += ' grayscale';
|
cssClass += ' grayscale';
|
||||||
|
@ -94,7 +94,7 @@ import 'flexStyles';
|
||||||
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
||||||
html += '<div class="cardPadder cardPadder-square"></div>';
|
html += '<div class="cardPadder cardPadder-square"></div>';
|
||||||
html += '<a is="emby-linkbutton" class="cardContent" href="useredit.html?userId=' + user.Id + '">';
|
html += '<a is="emby-linkbutton" class="cardContent" href="useredit.html?userId=' + user.Id + '">';
|
||||||
var imgUrl;
|
let imgUrl;
|
||||||
|
|
||||||
if (user.PrimaryImageTag) {
|
if (user.PrimaryImageTag) {
|
||||||
imgUrl = ApiClient.getUserImageUrl(user.Id, {
|
imgUrl = ApiClient.getUserImageUrl(user.Id, {
|
||||||
|
@ -104,7 +104,7 @@ import 'flexStyles';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageClass = 'cardImage';
|
let imageClass = 'cardImage';
|
||||||
|
|
||||||
if (user.Policy.IsDisabled) {
|
if (user.Policy.IsDisabled) {
|
||||||
imageClass += ' disabledUser';
|
imageClass += ' disabledUser';
|
||||||
|
@ -128,7 +128,7 @@ import 'flexStyles';
|
||||||
html += '<button type="button" is="paper-icon-button-light" class="btnUserMenu flex-shrink-zero"><span class="material-icons more_vert"></span></button>';
|
html += '<button type="button" is="paper-icon-button-light" class="btnUserMenu flex-shrink-zero"><span class="material-icons more_vert"></span></button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += '<div class="cardText cardText-secondary">';
|
html += '<div class="cardText cardText-secondary">';
|
||||||
var lastSeen = getLastSeenText(user.LastActivityDate);
|
const lastSeen = getLastSeenText(user.LastActivityDate);
|
||||||
html += '' != lastSeen ? lastSeen : ' ';
|
html += '' != lastSeen ? lastSeen : ' ';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -156,7 +156,7 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPendingUserMenu(elem) {
|
function showPendingUserMenu(elem) {
|
||||||
var menuItems = [];
|
const menuItems = [];
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
name: globalize.translate('ButtonCancel'),
|
name: globalize.translate('ButtonCancel'),
|
||||||
id: 'delete',
|
id: 'delete',
|
||||||
|
@ -164,9 +164,9 @@ import 'flexStyles';
|
||||||
});
|
});
|
||||||
|
|
||||||
import('actionsheet').then(({default: actionsheet}) => {
|
import('actionsheet').then(({default: actionsheet}) => {
|
||||||
var card = dom.parentWithClass(elem, 'card');
|
const card = dom.parentWithClass(elem, 'card');
|
||||||
var page = dom.parentWithClass(card, 'page');
|
const page = dom.parentWithClass(card, 'page');
|
||||||
var id = card.getAttribute('data-id');
|
const id = card.getAttribute('data-id');
|
||||||
actionsheet.show({
|
actionsheet.show({
|
||||||
items: menuItems,
|
items: menuItems,
|
||||||
positionTo: card,
|
positionTo: card,
|
||||||
|
@ -181,7 +181,7 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPendingUserHtml(user) {
|
function getPendingUserHtml(user) {
|
||||||
var html = '';
|
let html = '';
|
||||||
html += "<div data-id='" + user.Id + "' class='card squareCard scalableCard squareCard-scalable'>";
|
html += "<div data-id='" + user.Id + "' class='card squareCard scalableCard squareCard-scalable'>";
|
||||||
html += '<div class="cardBox cardBox-bottompadded visualCardBox">';
|
html += '<div class="cardBox cardBox-bottompadded visualCardBox">';
|
||||||
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
||||||
|
@ -254,19 +254,19 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
pageIdOn('pageinit', 'userProfilesPage', function () {
|
pageIdOn('pageinit', 'userProfilesPage', function () {
|
||||||
var page = this;
|
const page = this;
|
||||||
page.querySelector('.btnAddUser').addEventListener('click', function() {
|
page.querySelector('.btnAddUser').addEventListener('click', function() {
|
||||||
Dashboard.navigate('usernew.html');
|
Dashboard.navigate('usernew.html');
|
||||||
});
|
});
|
||||||
page.querySelector('.localUsers').addEventListener('click', function (e__e) {
|
page.querySelector('.localUsers').addEventListener('click', function (e__e) {
|
||||||
var btnUserMenu = dom.parentWithClass(e__e.target, 'btnUserMenu');
|
const btnUserMenu = dom.parentWithClass(e__e.target, 'btnUserMenu');
|
||||||
|
|
||||||
if (btnUserMenu) {
|
if (btnUserMenu) {
|
||||||
showUserMenu(btnUserMenu);
|
showUserMenu(btnUserMenu);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
page.querySelector('.pending').addEventListener('click', function (e__r) {
|
page.querySelector('.pending').addEventListener('click', function (e__r) {
|
||||||
var btnUserMenu = dom.parentWithClass(e__r.target, 'btnUserMenu');
|
const btnUserMenu = dom.parentWithClass(e__r.target, 'btnUserMenu');
|
||||||
|
|
||||||
if (btnUserMenu) {
|
if (btnUserMenu) {
|
||||||
showPendingUserMenu(btnUserMenu);
|
showPendingUserMenu(btnUserMenu);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue