fix initUnsavedChangedAlerts

This commit is contained in:
SvyatoslavArtymovych 2023-06-16 10:06:04 +03:00
parent b36cb9a9be
commit 906c581dbf
2 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -20,11 +20,11 @@ export const initUnsavedChangedAlerts = () => {
'.book-tags-input', '.book-tags-input',
'.multiple-input-word', '.multiple-input-word',
'.contributor-role-select', '.contributor-role-select',
// '.edit-permissions-btn',
'.add-contributor-btn', '.add-contributor-btn',
'input[type=checkbox]', 'input[type=checkbox]',
]; ];
if (window.location.href.includes('/settings')) {
elementsSelectors.forEach(selector => { elementsSelectors.forEach(selector => {
const elements: NodeListOf<HTMLElement> = const elements: NodeListOf<HTMLElement> =
document.querySelectorAll(selector); document.querySelectorAll(selector);
@ -32,6 +32,7 @@ export const initUnsavedChangedAlerts = () => {
initAlertOnClick(element); initAlertOnClick(element);
}); });
}); });
}
const elementsOnClickPrevent = document.querySelectorAll( const elementsOnClickPrevent = document.querySelectorAll(
'.prevent-unsaved-changes-event', '.prevent-unsaved-changes-event',