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:
djmaze 2020-07-15 14:25:51 +02:00
parent a6a337e5ce
commit 0b0747b8dc
19 changed files with 142 additions and 151 deletions

View file

@ -5,7 +5,7 @@ import key from 'key';
import { trim, isNormal, isArray, windowResize } from 'Common/Utils';
import { Capa, Focused, Layout, KeyState, EventKeyCode, Magics } from 'Common/Enums';
import { $html, leftPanelDisabled, moveAction } from 'Common/Globals';
import { $htmlCL, leftPanelDisabled, moveAction } from 'Common/Globals';
import { mailBox, settings } from 'Common/Links';
import { setFolderHash } from 'Common/Cache';
@ -242,7 +242,7 @@ class FolderListMailBoxUserView extends AbstractViewNext {
messagesDrop(toFolder, ui) {
if (toFolder && ui && ui.helper) {
const fromFolderFullNameRaw = ui.helper.data('rl-folder'),
copy = $html.hasClass('rl-ctrl-key-pressed'),
copy = $htmlCL.contains('rl-ctrl-key-pressed'),
uids = ui.helper.data('rl-uids');
if (isNormal(fromFolderFullNameRaw) && '' !== fromFolderFullNameRaw && isArray(uids)) {

View file

@ -17,7 +17,7 @@ import {
MessageSetAction
} from 'Common/Enums';
import { $html, leftPanelDisabled, keyScopeReal, useKeyboardShortcuts, moveAction } from 'Common/Globals';
import { $htmlCL, leftPanelDisabled, keyScopeReal, useKeyboardShortcuts, moveAction } from 'Common/Globals';
import {
inArray,
@ -323,7 +323,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
});
this.fullScreenMode.subscribe((value) => {
$html.toggleClass('rl-message-fullscreen', value);
$htmlCL.toggle('rl-message-fullscreen', value);
windowResize();
});