mirror of https://github.com/logos-co/open-law.git
fix initUnsavedChangedAlerts
This commit is contained in:
parent
b36cb9a9be
commit
906c581dbf
File diff suppressed because one or more lines are too long
|
@ -20,18 +20,19 @@ 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]',
|
||||||
];
|
];
|
||||||
|
|
||||||
elementsSelectors.forEach(selector => {
|
if (window.location.href.includes('/settings')) {
|
||||||
const elements: NodeListOf<HTMLElement> =
|
elementsSelectors.forEach(selector => {
|
||||||
document.querySelectorAll(selector);
|
const elements: NodeListOf<HTMLElement> =
|
||||||
elements.forEach(element => {
|
document.querySelectorAll(selector);
|
||||||
initAlertOnClick(element);
|
elements.forEach(element => {
|
||||||
|
initAlertOnClick(element);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
const elementsOnClickPrevent = document.querySelectorAll(
|
const elementsOnClickPrevent = document.querySelectorAll(
|
||||||
'.prevent-unsaved-changes-event',
|
'.prevent-unsaved-changes-event',
|
||||||
|
|
Loading…
Reference in New Issue