mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Upgraded some old JavaScript to ECMAScript 1.6
Removed some jQuery references Added JavaScript Globals.$htmlCL for frequently used window.document.documentElement.classList
This commit is contained in:
parent
a6a337e5ce
commit
0b0747b8dc
19 changed files with 142 additions and 151 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import ko from 'ko';
|
||||
import window from 'window';
|
||||
|
||||
import { delegateRun, inFocus } from 'Common/Utils';
|
||||
import { KeyState, EventKeyCode } from 'Common/Enums';
|
||||
import { $win, keyScope } from 'Common/Globals';
|
||||
import { keyScope } from 'Common/Globals';
|
||||
|
||||
export class AbstractViewNext {
|
||||
bDisabeCloseOnEsc = false;
|
||||
|
|
@ -35,7 +36,7 @@ export class AbstractViewNext {
|
|||
* @returns {void}
|
||||
*/
|
||||
registerPopupKeyDown() {
|
||||
$win.on('keydown', (event) => {
|
||||
window.addEventListener('keydown', (event) => {
|
||||
if (event && this.modalVisibility && this.modalVisibility()) {
|
||||
if (!this.bDisabeCloseOnEsc && EventKeyCode.Esc === event.keyCode) {
|
||||
delegateRun(this, 'cancelCommand');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue