Remove bootstrap Modal feature for improved transition effects (in future might use <dialog>)

This commit is contained in:
djmaze 2020-09-02 17:06:35 +02:00
parent 0309879d6b
commit 7135cc38fe
82 changed files with 1767 additions and 3990 deletions

15
dev/External/ko.js vendored
View file

@ -173,26 +173,13 @@ ko.bindingHandlers.modal = {
const Globals = require('Common/Globals');
element.classList.toggle('fade', !Globals.bMobileDevice);
new BSN.Modal(element, {
'keyboard': false,
'show': ko.unwrap(fValueAccessor())
});
const close = element.querySelector('.close'), click = () => fValueAccessor()(false);
close && close.addEventListener('click.koModal', click);
ko.utils.domNodeDisposal.addDisposeCallback(element, () =>
close.removeEventListener('click.koModal', click)
);
},
update: (element, fValueAccessor) => {
const htmlCL = doc.documentElement.classList;
element.Modal[ko.unwrap(fValueAccessor()) ? 'show' : 'hide']();
if (htmlCL.contains('no-mobile')) {
htmlCL.add('rl-modal-animation');
setTimeout(() => htmlCL.remove('rl-modal-animation'), 500);
}
}
};