mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Remove bootstrap Modal feature for improved transition effects (in future might use <dialog>)
This commit is contained in:
parent
0309879d6b
commit
7135cc38fe
82 changed files with 1767 additions and 3990 deletions
15
dev/External/ko.js
vendored
15
dev/External/ko.js
vendored
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue