mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 03:59:21 +03:00
Update dependencies
This commit is contained in:
parent
a30fc911f6
commit
b28d4f8cf3
7 changed files with 503 additions and 99 deletions
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import window from 'window';
|
||||
import $ from '$';
|
||||
import {bMobileDevice, bSafari} from 'Common/Globals';
|
||||
import * as Links from 'Common/Links';
|
||||
import * as Events from 'Common/Events';
|
||||
|
|
@ -38,8 +37,12 @@ class Audio
|
|||
|
||||
if (this.supported)
|
||||
{
|
||||
$(this.player).on('ended error', () => this.stop());
|
||||
Events.sub('audio.api.stop', () => this.stop());
|
||||
const stopFn = () => this.stop();
|
||||
|
||||
this.player.addEventListener('ended', stopFn);
|
||||
this.player.addEventListener('error', stopFn);
|
||||
|
||||
Events.sub('audio.api.stop', stopFn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@ function runApp()
|
|||
}
|
||||
}),
|
||||
common = Promise.all([
|
||||
// jassl('https://code.jquery.com/jquery-migrate-3.0.0.js'),
|
||||
jassl(appData.TemplatesLink),
|
||||
jassl(appData.LangLink)
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class HtmlEditor
|
|||
this.onReady = onReady;
|
||||
this.onModeChange = onModeChange;
|
||||
|
||||
this.element = element;
|
||||
this.$element = $(element);
|
||||
|
||||
this.resize = _.throttle(_.bind(this.resize, this), 100);
|
||||
|
|
@ -213,7 +214,7 @@ class HtmlEditor
|
|||
}
|
||||
|
||||
init() {
|
||||
if (this.$element && this.$element[0] && !this.editor)
|
||||
if (this.element && !this.editor)
|
||||
{
|
||||
const
|
||||
initFunc = () => {
|
||||
|
|
@ -248,7 +249,7 @@ class HtmlEditor
|
|||
window.CKEDITOR.env.isCompatible = true;
|
||||
}
|
||||
|
||||
this.editor = window.CKEDITOR.appendTo(this.$element[0], config);
|
||||
this.editor = window.CKEDITOR.appendTo(this.element, config);
|
||||
|
||||
this.editor.on('key', (event) => {
|
||||
if (event && event.data && EventKeyCode.Tab === event.data.keyCode)
|
||||
|
|
|
|||
|
|
@ -1556,6 +1556,24 @@ export function mailToHelper(mailToUrl, PopupComposeVoreModel)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Function} fn
|
||||
* @returns {void}
|
||||
*/
|
||||
export function domReady(fn)
|
||||
{
|
||||
$(() => fn());
|
||||
//
|
||||
// if ('loading' !== window.document.readyState)
|
||||
// {
|
||||
// fn();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// window.document.addEventListener('DOMContentLoaded', fn);
|
||||
// }
|
||||
}
|
||||
|
||||
export const windowResize = _.debounce((timeout) => {
|
||||
if (isUnd(timeout) || isNull(timeout))
|
||||
{
|
||||
|
|
|
|||
11
dev/bootstrap.js
vendored
11
dev/bootstrap.js
vendored
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import window from 'window';
|
||||
import $ from '$';
|
||||
import {killCtrlACtrlS, detectDropdownVisibility, createCommandLegacy} from 'Common/Utils';
|
||||
import {killCtrlACtrlS, detectDropdownVisibility, createCommandLegacy, domReady} from 'Common/Utils';
|
||||
import {$win, $html, data as GlobalsData, bMobileDevice} from 'Common/Globals';
|
||||
import * as Enums from 'Common/Enums';
|
||||
import * as Plugins from 'Common/Plugins';
|
||||
|
|
@ -20,9 +19,7 @@ export default (App) => {
|
|||
|
||||
$html
|
||||
.addClass(bMobileDevice ? 'mobile' : 'no-mobile')
|
||||
.on('click.dropdown.data-api', () => {
|
||||
detectDropdownVisibility();
|
||||
});
|
||||
.on('click.dropdown.data-api', detectDropdownVisibility);
|
||||
|
||||
const rl = window.rl || {};
|
||||
|
||||
|
|
@ -44,13 +41,13 @@ export default (App) => {
|
|||
|
||||
window.__APP_BOOT = (fErrorCallback) => {
|
||||
|
||||
$(() => {
|
||||
domReady(() => {
|
||||
|
||||
window.setTimeout(() => {
|
||||
|
||||
if (window.rainloopTEMPLATES && window.rainloopTEMPLATES[0])
|
||||
{
|
||||
$('#rl-templates').html(window.rainloopTEMPLATES[0]);
|
||||
window.document.getElementById('rl-templates').innerHTML = window.rainloopTEMPLATES[0];
|
||||
|
||||
window.setTimeout(() => {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue