mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix eslint warnings
This commit is contained in:
parent
dd824179f1
commit
72ca818500
35 changed files with 510 additions and 290 deletions
156
.eslintrc
Normal file
156
.eslintrc
Normal file
|
|
@ -0,0 +1,156 @@
|
||||||
|
{
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"modules": true,
|
||||||
|
"arrowFunctions": true,
|
||||||
|
"blockBindings": true
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"browser": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"comma-dangle": [2, "never"],
|
||||||
|
"no-cond-assign": 2,
|
||||||
|
"no-console": 2,
|
||||||
|
"no-constant-condition": 2,
|
||||||
|
"no-control-regex": 2,
|
||||||
|
"no-debugger": 2,
|
||||||
|
"no-dupe-keys": 2,
|
||||||
|
"no-empty": 2,
|
||||||
|
"no-empty-character-class": 2,
|
||||||
|
"no-ex-assign": 2,
|
||||||
|
"no-extra-boolean-cast": 2,
|
||||||
|
"no-extra-parens": 0,
|
||||||
|
"no-extra-semi": 2,
|
||||||
|
"no-func-assign": 2,
|
||||||
|
"no-inner-declarations": 2,
|
||||||
|
"no-invalid-regexp": 2,
|
||||||
|
"no-irregular-whitespace": 2,
|
||||||
|
"no-negated-in-lhs": 2,
|
||||||
|
"no-obj-calls": 2,
|
||||||
|
"no-regex-spaces": 2,
|
||||||
|
"no-reserved-keys": 0,
|
||||||
|
"no-sparse-arrays": 2,
|
||||||
|
"no-unreachable": 2,
|
||||||
|
"use-isnan": 2,
|
||||||
|
"valid-jsdoc": 0,
|
||||||
|
"valid-typeof": 2,
|
||||||
|
// Best Practices
|
||||||
|
"block-scoped-var": 2,
|
||||||
|
"complexity": 0,
|
||||||
|
"consistent-return": 2,
|
||||||
|
"curly": 2,
|
||||||
|
// "default-case": 2,
|
||||||
|
"dot-notation": 2,
|
||||||
|
"eqeqeq": 2,
|
||||||
|
"guard-for-in": 2,
|
||||||
|
"no-alert": 2,
|
||||||
|
"no-caller": 2,
|
||||||
|
"no-div-regex": 2,
|
||||||
|
"no-else-return": 2,
|
||||||
|
"no-eq-null": 2,
|
||||||
|
"no-eval": 2,
|
||||||
|
"no-extend-native": 2,
|
||||||
|
"no-extra-bind": 2,
|
||||||
|
"no-fallthrough": 2,
|
||||||
|
"no-floating-decimal": 2,
|
||||||
|
"no-implied-eval": 2,
|
||||||
|
"no-iterator": 2,
|
||||||
|
"no-labels": 2,
|
||||||
|
"no-lone-blocks": 2,
|
||||||
|
"no-loop-func": 2,
|
||||||
|
"no-multi-spaces": 2,
|
||||||
|
"no-multi-str": 0,
|
||||||
|
"no-native-reassign": 2,
|
||||||
|
"no-new": 2,
|
||||||
|
"no-new-func": 2,
|
||||||
|
"no-new-wrappers": 2,
|
||||||
|
"no-octal": 2,
|
||||||
|
"no-octal-escape": 2,
|
||||||
|
"no-process-env": 2,
|
||||||
|
"no-proto": 2,
|
||||||
|
"no-redeclare": 2,
|
||||||
|
"no-return-assign": 2,
|
||||||
|
"no-script-url": 2,
|
||||||
|
"no-self-compare": 2,
|
||||||
|
"no-sequences": 2,
|
||||||
|
"no-unused-expressions": 2,
|
||||||
|
"no-void": 0,
|
||||||
|
"no-warning-comments": 2,
|
||||||
|
"no-with": 2,
|
||||||
|
"radix": 2,
|
||||||
|
"vars-on-top": 0,
|
||||||
|
"wrap-iife": 2,
|
||||||
|
"yoda": 0,
|
||||||
|
// Strict Mode
|
||||||
|
"strict": 0,
|
||||||
|
// Variables
|
||||||
|
"no-catch-shadow": 2,
|
||||||
|
"no-delete-var": 2,
|
||||||
|
"no-label-var": 2,
|
||||||
|
"no-shadow": 2,
|
||||||
|
"no-shadow-restricted-names": 2,
|
||||||
|
"no-undef": 2,
|
||||||
|
"no-undef-init": 2,
|
||||||
|
"no-undefined": 2,
|
||||||
|
"no-unused-vars": 2,
|
||||||
|
"no-use-before-define": 2,
|
||||||
|
// Stylistic Issues
|
||||||
|
// "indent": [2, "tab", {
|
||||||
|
// "SwitchCase": 1,
|
||||||
|
// "VariableDeclarator": 1
|
||||||
|
// }],
|
||||||
|
"camelcase": 0,
|
||||||
|
"comma-spacing": 2,
|
||||||
|
"comma-style": 2,
|
||||||
|
"consistent-this": 0,
|
||||||
|
"eol-last": 2,
|
||||||
|
"func-names": 0,
|
||||||
|
"func-style": 0,
|
||||||
|
"key-spacing": [2, {
|
||||||
|
"beforeColon": false,
|
||||||
|
"afterColon": true
|
||||||
|
}],
|
||||||
|
"max-nested-callbacks": 0,
|
||||||
|
"new-cap": 2,
|
||||||
|
"new-parens": 2,
|
||||||
|
"no-array-constructor": 2,
|
||||||
|
"no-inline-comments": 0,
|
||||||
|
// "no-lonely-if": 2,
|
||||||
|
"no-mixed-spaces-and-tabs": 2,
|
||||||
|
// "no-nested-ternary": 2,
|
||||||
|
"no-new-object": 2,
|
||||||
|
"semi-spacing": [2, {
|
||||||
|
"before": false,
|
||||||
|
"after": true
|
||||||
|
}],
|
||||||
|
"no-spaced-func": 2,
|
||||||
|
"no-ternary": 0,
|
||||||
|
"no-trailing-spaces": 2,
|
||||||
|
"no-multiple-empty-lines": 2,
|
||||||
|
"no-underscore-dangle": 0,
|
||||||
|
"one-var": 0,
|
||||||
|
"operator-assignment": [2, "always"],
|
||||||
|
"padded-blocks": 0,
|
||||||
|
"quotes": [2, "single"],
|
||||||
|
"quote-props": [2, "as-needed"],
|
||||||
|
"semi": [2, "always"],
|
||||||
|
// "sort-vars": [2, {"ignoreCase": true}],
|
||||||
|
"space-before-blocks": 2,
|
||||||
|
"object-curly-spacing": [2, "never"],
|
||||||
|
"array-bracket-spacing": [2, "never"],
|
||||||
|
"space-in-parens": 2,
|
||||||
|
"space-infix-ops": 2,
|
||||||
|
"space-unary-ops": 2,
|
||||||
|
"spaced-comment": 2,
|
||||||
|
"wrap-regex": 0,
|
||||||
|
// Legacy
|
||||||
|
"max-depth": 0,
|
||||||
|
"max-len": [2, 200],
|
||||||
|
"max-params": 0,
|
||||||
|
"max-statements": 0,
|
||||||
|
"no-plusplus": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
import {window, _, $, key} from 'common';
|
import {window, _, $, key} from 'common';
|
||||||
import Globals from 'Common/Globals';
|
import Globals from 'Common/Globals';
|
||||||
import * as Enums from 'Common/Enums';
|
import * as Enums from 'Common/Enums';
|
||||||
import Utils from 'Common/Utils';
|
import Utils from 'Common/Utils';
|
||||||
import Links from 'Common/Links';
|
import Links from 'Common/Links';
|
||||||
import Events from 'Common/Events';
|
import Events from 'Common/Events';
|
||||||
|
|
@ -64,7 +64,7 @@ class AbstractApp extends AbstractBoot
|
||||||
|
|
||||||
}, 50));
|
}, 50));
|
||||||
|
|
||||||
// DEBUG
|
// DEBUG
|
||||||
// Events.sub({
|
// Events.sub({
|
||||||
// 'window.resize': function () {
|
// 'window.resize': function () {
|
||||||
// window.console.log('window.resize');
|
// window.console.log('window.resize');
|
||||||
|
|
@ -112,15 +112,15 @@ class AbstractApp extends AbstractBoot
|
||||||
if (Globals.sUserAgent && (Globals.sUserAgent.indexOf('chrome') > -1 || Globals.sUserAgent.indexOf('chrome') > -1))
|
if (Globals.sUserAgent && (Globals.sUserAgent.indexOf('chrome') > -1 || Globals.sUserAgent.indexOf('chrome') > -1))
|
||||||
{
|
{
|
||||||
const oLink = window.document.createElement('a');
|
const oLink = window.document.createElement('a');
|
||||||
oLink['href'] = link;
|
oLink.href = link;
|
||||||
|
|
||||||
if (window.document['createEvent'])
|
if (window.document && window.document.createEvent)
|
||||||
{
|
{
|
||||||
const oE = window.document['createEvent']('MouseEvents');
|
const oE = window.document.createEvent.MouseEvents;
|
||||||
if (oE && oE['initEvent'] && oLink['dispatchEvent'])
|
if (oE && oE.initEvent && oLink.dispatchEvent)
|
||||||
{
|
{
|
||||||
oE['initEvent']('click', true, true);
|
oE.initEvent('click', true, true);
|
||||||
oLink['dispatchEvent'](oE);
|
oLink.dispatchEvent(oE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -179,14 +179,14 @@ class AbstractApp extends AbstractBoot
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} key
|
* @param {string} token
|
||||||
*/
|
*/
|
||||||
setClientSideToken(key) {
|
setClientSideToken(token) {
|
||||||
if (window.__rlah_set)
|
if (window.__rlah_set)
|
||||||
{
|
{
|
||||||
window.__rlah_set(key);
|
window.__rlah_set(token);
|
||||||
|
|
||||||
require('Storage/Settings').settingsSet('AuthAccountHash', key);
|
require('Storage/Settings').settingsSet('AuthAccountHash', token);
|
||||||
require('Common/Links').populateAuthSuffix();
|
require('Common/Links').populateAuthSuffix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +203,7 @@ class AbstractApp extends AbstractBoot
|
||||||
inIframe = !!Settings.settingsGet('InIframe')
|
inIframe = !!Settings.settingsGet('InIframe')
|
||||||
;
|
;
|
||||||
|
|
||||||
let customLogoutLink = Utils.pString(Settings.settingsGet('CustomLogoutLink'))
|
let customLogoutLink = Utils.pString(Settings.settingsGet('CustomLogoutLink'));
|
||||||
|
|
||||||
if (logout)
|
if (logout)
|
||||||
{
|
{
|
||||||
|
|
@ -273,7 +273,7 @@ class AbstractApp extends AbstractBoot
|
||||||
ko.components.register('x-script', require('Component/Script'));
|
ko.components.register('x-script', require('Component/Script'));
|
||||||
// ko.components.register('svg-icon', require('Component/SvgIcon'));
|
// ko.components.register('svg-icon', require('Component/SvgIcon'));
|
||||||
|
|
||||||
if (/**false && /**/Settings.settingsGet('MaterialDesign') && Globals.bAnimationSupported)
|
if (Settings.settingsGet('MaterialDesign') && Globals.bAnimationSupported)
|
||||||
{
|
{
|
||||||
ko.components.register('Checkbox', require('Component/MaterialDesign/Checkbox'));
|
ko.components.register('Checkbox', require('Component/MaterialDesign/Checkbox'));
|
||||||
ko.components.register('CheckboxSimple', require('Component/Checkbox'));
|
ko.components.register('CheckboxSimple', require('Component/Checkbox'));
|
||||||
|
|
@ -291,49 +291,49 @@ class AbstractApp extends AbstractBoot
|
||||||
_.delay(Utils.windowResizeCallback, 1000);
|
_.delay(Utils.windowResizeCallback, 1000);
|
||||||
|
|
||||||
ssm.addState({
|
ssm.addState({
|
||||||
'id': 'mobile',
|
id: 'mobile',
|
||||||
'maxWidth': 767,
|
maxWidth: 767,
|
||||||
'onEnter': () => {
|
onEnter: () => {
|
||||||
Globals.$html.addClass('ssm-state-mobile');
|
Globals.$html.addClass('ssm-state-mobile');
|
||||||
Events.pub('ssm.mobile-enter');
|
Events.pub('ssm.mobile-enter');
|
||||||
},
|
},
|
||||||
'onLeave': () => {
|
onLeave: () => {
|
||||||
Globals.$html.removeClass('ssm-state-mobile');
|
Globals.$html.removeClass('ssm-state-mobile');
|
||||||
Events.pub('ssm.mobile-leave');
|
Events.pub('ssm.mobile-leave');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ssm.addState({
|
ssm.addState({
|
||||||
'id': 'tablet',
|
id: 'tablet',
|
||||||
'minWidth': 768,
|
minWidth: 768,
|
||||||
'maxWidth': 999,
|
maxWidth: 999,
|
||||||
'onEnter': function() {
|
onEnter: function() {
|
||||||
Globals.$html.addClass('ssm-state-tablet');
|
Globals.$html.addClass('ssm-state-tablet');
|
||||||
},
|
},
|
||||||
'onLeave': function() {
|
onLeave: function() {
|
||||||
Globals.$html.removeClass('ssm-state-tablet');
|
Globals.$html.removeClass('ssm-state-tablet');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ssm.addState({
|
ssm.addState({
|
||||||
'id': 'desktop',
|
id: 'desktop',
|
||||||
'minWidth': 1000,
|
minWidth: 1000,
|
||||||
'maxWidth': 1400,
|
maxWidth: 1400,
|
||||||
'onEnter': () => {
|
onEnter: () => {
|
||||||
Globals.$html.addClass('ssm-state-desktop');
|
Globals.$html.addClass('ssm-state-desktop');
|
||||||
},
|
},
|
||||||
'onLeave': () => {
|
onLeave: () => {
|
||||||
Globals.$html.removeClass('ssm-state-desktop');
|
Globals.$html.removeClass('ssm-state-desktop');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ssm.addState({
|
ssm.addState({
|
||||||
'id': 'desktop-large',
|
id: 'desktop-large',
|
||||||
'minWidth': 1400,
|
minWidth: 1400,
|
||||||
'onEnter': () => {
|
onEnter: () => {
|
||||||
Globals.$html.addClass('ssm-state-desktop-large');
|
Globals.$html.addClass('ssm-state-desktop-large');
|
||||||
},
|
},
|
||||||
'onLeave': () => {
|
onLeave: () => {
|
||||||
Globals.$html.removeClass('ssm-state-desktop-large');
|
Globals.$html.removeClass('ssm-state-desktop-large');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -360,7 +360,7 @@ class AbstractApp extends AbstractBoot
|
||||||
require('Stores/Language').populate();
|
require('Stores/Language').populate();
|
||||||
require('Stores/Theme').populate();
|
require('Stores/Theme').populate();
|
||||||
require('Stores/Social').populate();
|
require('Stores/Social').populate();
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {AbstractApp, AbstractApp as default};
|
export {AbstractApp, AbstractApp as default};
|
||||||
|
|
@ -3,7 +3,7 @@ import {window, _} from 'common';
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
import progressJs from 'progressJs';
|
import progressJs from 'progressJs';
|
||||||
|
|
||||||
import * as Enums from 'Common/Enums';
|
import * as Enums from 'Common/Enums';
|
||||||
import Utils from 'Common/Utils';
|
import Utils from 'Common/Utils';
|
||||||
import Links from 'Common/Links';
|
import Links from 'Common/Links';
|
||||||
import Translator from 'Common/Translator';
|
import Translator from 'Common/Translator';
|
||||||
|
|
@ -41,9 +41,9 @@ class AdminApp extends AbstractApp
|
||||||
{
|
{
|
||||||
DomainStore.domains(_.map(data.Result, (enabled, name) => {
|
DomainStore.domains(_.map(data.Result, (enabled, name) => {
|
||||||
return {
|
return {
|
||||||
'name': name,
|
name: name,
|
||||||
'disabled': ko.observable(!enabled),
|
disabled: ko.observable(!enabled),
|
||||||
'deleteAccess': ko.observable(false)
|
deleteAccess: ko.observable(false)
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
@ -58,9 +58,9 @@ class AdminApp extends AbstractApp
|
||||||
{
|
{
|
||||||
PluginStore.plugins(_.map(data.Result, (item) => {
|
PluginStore.plugins(_.map(data.Result, (item) => {
|
||||||
return {
|
return {
|
||||||
'name': item['Name'],
|
name: item.Name,
|
||||||
'disabled': ko.observable(!item['Enabled']),
|
disabled: ko.observable(!item.Enabled),
|
||||||
'configured': ko.observable(!!item['Configured'])
|
configured: ko.observable(!!item.Configured)
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
@ -83,9 +83,9 @@ class AdminApp extends AbstractApp
|
||||||
;
|
;
|
||||||
|
|
||||||
_.each(PackageStore.packages(), (item) => {
|
_.each(PackageStore.packages(), (item) => {
|
||||||
if (item && item['loading']())
|
if (item && item.loading())
|
||||||
{
|
{
|
||||||
loading[item['file']] = item;
|
loading[item.file] = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -94,8 +94,8 @@ class AdminApp extends AbstractApp
|
||||||
list = _.compact(_.map(data.Result.List, (item) => {
|
list = _.compact(_.map(data.Result.List, (item) => {
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
item['loading'] = ko.observable(!Utils.isUnd(loading[item['file']]));
|
item.loading = ko.observable(!Utils.isUnd(loading[item.file]));
|
||||||
return 'core' === item['type'] && !item['canBeInstalled'] ? null : item;
|
return 'core' === item.type && !item.canBeInstalled ? null : item;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}));
|
}));
|
||||||
|
|
@ -170,10 +170,10 @@ class AdminApp extends AbstractApp
|
||||||
LicenseStore.licenseError('');
|
LicenseStore.licenseError('');
|
||||||
Remote.licensing((result, data) => {
|
Remote.licensing((result, data) => {
|
||||||
LicenseStore.licensingProcess(false);
|
LicenseStore.licensingProcess(false);
|
||||||
if (Enums.StorageResultType.Success === result && data && data.Result && Utils.isNormal(data.Result['Expired']))
|
if (Enums.StorageResultType.Success === result && data && data.Result && Utils.isNormal(data.Result.Expired))
|
||||||
{
|
{
|
||||||
LicenseStore.licenseValid(true);
|
LicenseStore.licenseValid(true);
|
||||||
LicenseStore.licenseExpired(Utils.pInt(data.Result['Expired']));
|
LicenseStore.licenseExpired(Utils.pInt(data.Result.Expired));
|
||||||
LicenseStore.licenseError('');
|
LicenseStore.licenseError('');
|
||||||
LicenseStore.licensing(true);
|
LicenseStore.licensing(true);
|
||||||
AppStore.prem(true);
|
AppStore.prem(true);
|
||||||
|
|
@ -237,7 +237,7 @@ class AdminApp extends AbstractApp
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!!Settings.settingsGet('Auth'))
|
if (Settings.settingsGet('Auth'))
|
||||||
{
|
{
|
||||||
kn.startScreens([
|
kn.startScreens([
|
||||||
require('Screen/Admin/Settings')
|
require('Screen/Admin/Settings')
|
||||||
|
|
|
||||||
189
dev/App/User.jsx
189
dev/App/User.jsx
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
import {window, _, $} from 'common';
|
import {window, _, $} from 'common';
|
||||||
import ko from 'ko';
|
|
||||||
import progressJs from 'progressJs';
|
import progressJs from 'progressJs';
|
||||||
import Tinycon from 'Tinycon';
|
import Tinycon from 'Tinycon';
|
||||||
|
|
||||||
|
|
@ -86,10 +85,15 @@ class AppUser extends AbstractApp
|
||||||
if (Settings.settingsGet('UserBackgroundHash'))
|
if (Settings.settingsGet('UserBackgroundHash'))
|
||||||
{
|
{
|
||||||
_.delay(() => {
|
_.delay(() => {
|
||||||
$('#rl-bg').attr('style', 'background-image: none !important;')
|
$('#rl-bg')
|
||||||
.backstretch(Links.userBackground(Settings.settingsGet('UserBackgroundHash')), {
|
.attr('style', 'background-image: none !important;')
|
||||||
'fade': Globals.bAnimationSupported ? 1000 : 0, 'centeredX': true, 'centeredY': true
|
.backstretch(Links.userBackground(Settings.settingsGet('UserBackgroundHash')), {
|
||||||
}).removeAttr('style');
|
fade: Globals.bAnimationSupported ? 1000 : 0,
|
||||||
|
centeredX: true,
|
||||||
|
centeredY: true
|
||||||
|
})
|
||||||
|
.removeAttr('style')
|
||||||
|
;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -205,12 +209,12 @@ class AppUser extends AbstractApp
|
||||||
_.each(this.oMoveCache, (oItem) => {
|
_.each(this.oMoveCache, (oItem) => {
|
||||||
|
|
||||||
var
|
var
|
||||||
bSpam = sSpamFolder === oItem['To'],
|
bSpam = sSpamFolder === oItem.To,
|
||||||
bTrash = sTrashFolder === oItem['To'],
|
bTrash = sTrashFolder === oItem.To,
|
||||||
bHam = !bSpam && sSpamFolder === oItem['From'] && Cache.getFolderInboxName() === oItem['To']
|
bHam = !bSpam && sSpamFolder === oItem.From && Cache.getFolderInboxName() === oItem.To
|
||||||
;
|
;
|
||||||
|
|
||||||
Remote.messagesMove(this.moveOrDeleteResponseHelper, oItem['From'], oItem['To'], oItem['Uid'],
|
Remote.messagesMove(this.moveOrDeleteResponseHelper, oItem.From, oItem.To, oItem.Uid,
|
||||||
bSpam ? 'SPAM' : (bHam ? 'HAM' : ''), bSpam || bTrash);
|
bSpam ? 'SPAM' : (bHam ? 'HAM' : ''), bSpam || bTrash);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -223,13 +227,13 @@ class AppUser extends AbstractApp
|
||||||
if (!this.oMoveCache[sH])
|
if (!this.oMoveCache[sH])
|
||||||
{
|
{
|
||||||
this.oMoveCache[sH] = {
|
this.oMoveCache[sH] = {
|
||||||
'From': sFromFolderFullNameRaw,
|
From: sFromFolderFullNameRaw,
|
||||||
'To': sToFolderFullNameRaw,
|
To: sToFolderFullNameRaw,
|
||||||
'Uid': []
|
Uid: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.oMoveCache[sH]['Uid'] = _.union(this.oMoveCache[sH]['Uid'], aUidForMove);
|
this.oMoveCache[sH].Uid = _.union(this.oMoveCache[sH].Uid, aUidForMove);
|
||||||
this.messagesMoveTrigger();
|
this.messagesMoveTrigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -434,13 +438,13 @@ class AppUser extends AbstractApp
|
||||||
;
|
;
|
||||||
|
|
||||||
if (oItem.users) {
|
if (oItem.users) {
|
||||||
_.each(oItem.users, (oItem) => {
|
_.each(oItem.users, (item) => {
|
||||||
oEmail.clear();
|
oEmail.clear();
|
||||||
oEmail.mailsoParse(oItem.userId.userid);
|
oEmail.mailsoParse(item.userId.userid);
|
||||||
if (oEmail.validate())
|
if (oEmail.validate())
|
||||||
{
|
{
|
||||||
aEmails.push(oEmail.email);
|
aEmails.push(oEmail.email);
|
||||||
aUsers.push(oItem.userId.userid);
|
aUsers.push(item.userId.userid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -494,7 +498,7 @@ class AppUser extends AbstractApp
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
};
|
}
|
||||||
|
|
||||||
accountsAndIdentities(bBoot) {
|
accountsAndIdentities(bBoot) {
|
||||||
|
|
||||||
|
|
@ -516,7 +520,7 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
sParentEmail = '' === sParentEmail ? sAccountEmail : sParentEmail;
|
sParentEmail = '' === sParentEmail ? sAccountEmail : sParentEmail;
|
||||||
|
|
||||||
if (Utils.isArray(oData.Result['Accounts']))
|
if (Utils.isArray(oData.Result.Accounts))
|
||||||
{
|
{
|
||||||
_.each(AccountStore.accounts(), (oAccount) => {
|
_.each(AccountStore.accounts(), (oAccount) => {
|
||||||
aCounts[oAccount.email] = oAccount.count();
|
aCounts[oAccount.email] = oAccount.count();
|
||||||
|
|
@ -524,7 +528,7 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
Utils.delegateRunOnDestroy(AccountStore.accounts());
|
Utils.delegateRunOnDestroy(AccountStore.accounts());
|
||||||
|
|
||||||
AccountStore.accounts(_.map(oData.Result['Accounts'],
|
AccountStore.accounts(_.map(oData.Result.Accounts,
|
||||||
(sValue) => new AccountModel(sValue, sValue !== sParentEmail, aCounts[sValue] || 0)));
|
(sValue) => new AccountModel(sValue, sValue !== sParentEmail, aCounts[sValue] || 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -534,23 +538,23 @@ class AppUser extends AbstractApp
|
||||||
Events.sub('interval.10m-after5m', () => this.accountsCounts());
|
Events.sub('interval.10m-after5m', () => this.accountsCounts());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.isArray(oData.Result['Identities']))
|
if (Utils.isArray(oData.Result.Identities))
|
||||||
{
|
{
|
||||||
Utils.delegateRunOnDestroy(IdentityStore.identities());
|
Utils.delegateRunOnDestroy(IdentityStore.identities());
|
||||||
|
|
||||||
IdentityStore.identities(_.map(oData.Result['Identities'], (oIdentityData) => {
|
IdentityStore.identities(_.map(oData.Result.Identities, (oIdentityData) => {
|
||||||
|
|
||||||
const
|
const
|
||||||
sId = Utils.pString(oIdentityData['Id']),
|
sId = Utils.pString(oIdentityData.Id),
|
||||||
sEmail = Utils.pString(oIdentityData['Email']),
|
sEmail = Utils.pString(oIdentityData.Email),
|
||||||
oIdentity = new IdentityModel(sId, sEmail)
|
oIdentity = new IdentityModel(sId, sEmail)
|
||||||
;
|
;
|
||||||
|
|
||||||
oIdentity.name(Utils.pString(oIdentityData['Name']));
|
oIdentity.name(Utils.pString(oIdentityData.Name));
|
||||||
oIdentity.replyTo(Utils.pString(oIdentityData['ReplyTo']));
|
oIdentity.replyTo(Utils.pString(oIdentityData.ReplyTo));
|
||||||
oIdentity.bcc(Utils.pString(oIdentityData['Bcc']));
|
oIdentity.bcc(Utils.pString(oIdentityData.Bcc));
|
||||||
oIdentity.signature(Utils.pString(oIdentityData['Signature']));
|
oIdentity.signature(Utils.pString(oIdentityData.Signature));
|
||||||
oIdentity.signatureInsertBefore(!!oIdentityData['SignatureInsertBefore']);
|
oIdentity.signatureInsertBefore(!!oIdentityData.SignatureInsertBefore);
|
||||||
|
|
||||||
return oIdentity;
|
return oIdentity;
|
||||||
}));
|
}));
|
||||||
|
|
@ -568,11 +572,11 @@ class AppUser extends AbstractApp
|
||||||
TemplateStore.templates.loading(false);
|
TemplateStore.templates.loading(false);
|
||||||
|
|
||||||
if (Enums.StorageResultType.Success === result && data.Result &&
|
if (Enums.StorageResultType.Success === result && data.Result &&
|
||||||
Utils.isArray(data.Result['Templates']))
|
Utils.isArray(data.Result.Templates))
|
||||||
{
|
{
|
||||||
Utils.delegateRunOnDestroy(TemplateStore.templates());
|
Utils.delegateRunOnDestroy(TemplateStore.templates());
|
||||||
|
|
||||||
TemplateStore.templates(_.compact(_.map(data.Result['Templates'], (templateData) => {
|
TemplateStore.templates(_.compact(_.map(data.Result.Templates, (templateData) => {
|
||||||
const template = new TemplateModel();
|
const template = new TemplateModel();
|
||||||
return template.parse(templateData) ? template : null;
|
return template.parse(templateData) ? template : null;
|
||||||
})));
|
})));
|
||||||
|
|
@ -606,15 +610,14 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
let
|
let
|
||||||
uid = '',
|
uid = '',
|
||||||
list = [],
|
|
||||||
check = false,
|
check = false,
|
||||||
unreadCountChange = false
|
unreadCountChange = false
|
||||||
;
|
;
|
||||||
|
|
||||||
const folder = Cache.getFolderFromCacheList(data.Result.Folder);
|
const folderFromCache = Cache.getFolderFromCacheList(data.Result.Folder);
|
||||||
if (folder)
|
if (folderFromCache)
|
||||||
{
|
{
|
||||||
folder.interval = Momentor.momentNowUnix();
|
folderFromCache.interval = Momentor.momentNowUnix();
|
||||||
|
|
||||||
if (data.Result.Hash)
|
if (data.Result.Hash)
|
||||||
{
|
{
|
||||||
|
|
@ -623,22 +626,22 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
if (Utils.isNormal(data.Result.MessageCount))
|
if (Utils.isNormal(data.Result.MessageCount))
|
||||||
{
|
{
|
||||||
folder.messageCountAll(data.Result.MessageCount);
|
folderFromCache.messageCountAll(data.Result.MessageCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.isNormal(data.Result.MessageUnseenCount))
|
if (Utils.isNormal(data.Result.MessageUnseenCount))
|
||||||
{
|
{
|
||||||
if (Utils.pInt(folder.messageCountUnread()) !== Utils.pInt(data.Result.MessageUnseenCount))
|
if (Utils.pInt(folderFromCache.messageCountUnread()) !== Utils.pInt(data.Result.MessageUnseenCount))
|
||||||
{
|
{
|
||||||
unreadCountChange = true;
|
unreadCountChange = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
folder.messageCountUnread(data.Result.MessageUnseenCount);
|
folderFromCache.messageCountUnread(data.Result.MessageUnseenCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unreadCountChange)
|
if (unreadCountChange)
|
||||||
{
|
{
|
||||||
Cache.clearMessageFlagsFromCacheByFolder(folder.fullNameRaw);
|
Cache.clearMessageFlagsFromCacheByFolder(folderFromCache.fullNameRaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.Result.Flags)
|
if (data.Result.Flags)
|
||||||
|
|
@ -649,8 +652,8 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
check = true;
|
check = true;
|
||||||
const flags = data.Result.Flags[uid];
|
const flags = data.Result.Flags[uid];
|
||||||
Cache.storeMessageFlagsToCacheByFolderAndUid(folder.fullNameRaw, uid.toString(), [
|
Cache.storeMessageFlagsToCacheByFolderAndUid(folderFromCache.fullNameRaw, uid.toString(), [
|
||||||
!flags['IsSeen'], !!flags['IsFlagged'], !!flags['IsAnswered'], !!flags['IsForwarded'], !!flags['IsReadReceipt']
|
!flags.IsSeen, !!flags.IsFlagged, !!flags.IsAnswered, !!flags.IsForwarded, !!flags.IsReadReceipt
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -661,16 +664,16 @@ class AppUser extends AbstractApp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageStore.initUidNextAndNewMessages(folder.fullNameRaw, data.Result.UidNext, data.Result.NewMessages);
|
MessageStore.initUidNextAndNewMessages(folderFromCache.fullNameRaw, data.Result.UidNext, data.Result.NewMessages);
|
||||||
|
|
||||||
const hash = Cache.getFolderHash(data.Result.Folder);
|
const hash = Cache.getFolderHash(data.Result.Folder);
|
||||||
if (data.Result.Hash !== hash || '' === hash || unreadCountChange)
|
if (data.Result.Hash !== hash || '' === hash || unreadCountChange)
|
||||||
{
|
{
|
||||||
if (folder.fullNameRaw === FolderStore.currentFolderFullNameRaw())
|
if (folderFromCache.fullNameRaw === FolderStore.currentFolderFullNameRaw())
|
||||||
{
|
{
|
||||||
this.reloadMessageList();
|
this.reloadMessageList();
|
||||||
}
|
}
|
||||||
else if (Cache.getFolderInboxName() === folder.fullNameRaw)
|
else if (Cache.getFolderInboxName() === folderFromCache.fullNameRaw)
|
||||||
{
|
{
|
||||||
this.recacheInboxMessageList();
|
this.recacheInboxMessageList();
|
||||||
}
|
}
|
||||||
|
|
@ -680,7 +683,7 @@ class AppUser extends AbstractApp
|
||||||
}
|
}
|
||||||
}, folder, list);
|
}, folder, list);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean=} boot = false
|
* @param {boolean=} boot = false
|
||||||
|
|
@ -762,7 +765,7 @@ class AppUser extends AbstractApp
|
||||||
}
|
}
|
||||||
}, folders);
|
}, folders);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} sFolderFullNameRaw
|
* @param {string} sFolderFullNameRaw
|
||||||
|
|
@ -873,9 +876,9 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
if (Enums.StorageResultType.Success === result && data && data.Result)
|
if (Enums.StorageResultType.Success === result && data && data.Result)
|
||||||
{
|
{
|
||||||
SocialStore.google.userName(data.Result['Google'] || '');
|
SocialStore.google.userName(data.Result.Google || '');
|
||||||
SocialStore.facebook.userName(data.Result['Facebook'] || '');
|
SocialStore.facebook.userName(data.Result.Facebook || '');
|
||||||
SocialStore.twitter.userName(data.Result['Twitter'] || '');
|
SocialStore.twitter.userName(data.Result.Twitter || '');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -955,6 +958,21 @@ class AppUser extends AbstractApp
|
||||||
oTop = null,
|
oTop = null,
|
||||||
oBottom = null,
|
oBottom = null,
|
||||||
|
|
||||||
|
fSetHeight = (height) => {
|
||||||
|
if (height)
|
||||||
|
{
|
||||||
|
if (oTop)
|
||||||
|
{
|
||||||
|
oTop.attr('style', 'height:' + height + 'px');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oBottom)
|
||||||
|
{
|
||||||
|
oBottom.attr('style', 'top:' + (55 /* top toolbar */ + height) + 'px');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
fResizeCreateFunction = (event) => {
|
fResizeCreateFunction = (event) => {
|
||||||
if (event && event.target)
|
if (event && event.target)
|
||||||
{
|
{
|
||||||
|
|
@ -992,29 +1010,14 @@ class AppUser extends AbstractApp
|
||||||
},
|
},
|
||||||
|
|
||||||
oOptions = {
|
oOptions = {
|
||||||
'helper': 'ui-resizable-helper-h',
|
helper: 'ui-resizable-helper-h',
|
||||||
'minHeight': iMinHeight,
|
minHeight: iMinHeight,
|
||||||
'maxHeight': iMaxHeight,
|
maxHeight: iMaxHeight,
|
||||||
'handles': 's',
|
handles: 's',
|
||||||
'create': fResizeCreateFunction,
|
create: fResizeCreateFunction,
|
||||||
'resize': fResizeResizeFunction,
|
resize: fResizeResizeFunction,
|
||||||
'start': fResizeStartFunction,
|
start: fResizeStartFunction,
|
||||||
'stop': fResizeStopFunction
|
stop: fResizeStopFunction
|
||||||
},
|
|
||||||
|
|
||||||
fSetHeight = (height) => {
|
|
||||||
if (height)
|
|
||||||
{
|
|
||||||
if (oTop)
|
|
||||||
{
|
|
||||||
oTop.attr('style', 'height:' + height + 'px');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oBottom)
|
|
||||||
{
|
|
||||||
oBottom.attr('style', 'top:' + (55 /* top toolbar */ + height) + 'px');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
fDisable = (bDisable) => {
|
fDisable = (bDisable) => {
|
||||||
|
|
@ -1054,7 +1057,7 @@ class AppUser extends AbstractApp
|
||||||
Events.sub('layout', (layout) => {
|
Events.sub('layout', (layout) => {
|
||||||
fDisable(Enums.Layout.BottomPreview !== layout);
|
fDisable(Enums.Layout.BottomPreview !== layout);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
initVerticalLayoutResizer(sClientSideKeyName) {
|
initVerticalLayoutResizer(sClientSideKeyName) {
|
||||||
|
|
||||||
|
|
@ -1070,11 +1073,11 @@ class AppUser extends AbstractApp
|
||||||
if (iWidth)
|
if (iWidth)
|
||||||
{
|
{
|
||||||
oLeft.css({
|
oLeft.css({
|
||||||
'width': '' + iWidth + 'px'
|
width: '' + iWidth + 'px'
|
||||||
});
|
});
|
||||||
|
|
||||||
oRight.css({
|
oRight.css({
|
||||||
'left': '' + iWidth + 'px'
|
left: '' + iWidth + 'px'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1118,7 +1121,7 @@ class AppUser extends AbstractApp
|
||||||
Local.set(sClientSideKeyName, oObject.size.width);
|
Local.set(sClientSideKeyName, oObject.size.width);
|
||||||
|
|
||||||
oRight.css({
|
oRight.css({
|
||||||
'left': '' + oObject.size.width + 'px'
|
left: '' + oObject.size.width + 'px'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1130,14 +1133,14 @@ class AppUser extends AbstractApp
|
||||||
}
|
}
|
||||||
|
|
||||||
oLeft.resizable({
|
oLeft.resizable({
|
||||||
'helper': 'ui-resizable-helper-w',
|
helper: 'ui-resizable-helper-w',
|
||||||
'minWidth': iMinWidth,
|
minWidth: iMinWidth,
|
||||||
'maxWidth': 350,
|
maxWidth: 350,
|
||||||
'handles': 'e',
|
handles: 'e',
|
||||||
'create': fResizeCreateFunction,
|
create: fResizeCreateFunction,
|
||||||
'resize': fResizeResizeFunction,
|
resize: fResizeResizeFunction,
|
||||||
'start': fResizeStartFunction,
|
start: fResizeStartFunction,
|
||||||
'stop': fResizeStopFunction
|
stop: fResizeStopFunction
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.sub('left-panel.off', () => {
|
Events.sub('left-panel.off', () => {
|
||||||
|
|
@ -1154,7 +1157,7 @@ class AppUser extends AbstractApp
|
||||||
this.loginAndLogoutReload(false, true,
|
this.loginAndLogoutReload(false, true,
|
||||||
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length);
|
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
bootstartTwoFactorScreen() {
|
bootstartTwoFactorScreen() {
|
||||||
kn.showScreenPopup(require('View/Popup/TwoFactorConfiguration'), [true]);
|
kn.showScreenPopup(require('View/Popup/TwoFactorConfiguration'), [true]);
|
||||||
|
|
@ -1195,7 +1198,7 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
kn.hideLoading();
|
kn.hideLoading();
|
||||||
|
|
||||||
progressJs.onbeforeend(() => {
|
progressJs.onbeforeend(() => {
|
||||||
$('.progressjs-container').hide();
|
$('.progressjs-container').hide();
|
||||||
_.delay(() => {
|
_.delay(() => {
|
||||||
$('.progressjs-container').remove();
|
$('.progressjs-container').remove();
|
||||||
|
|
@ -1208,7 +1211,7 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
kn.hideLoading();
|
kn.hideLoading();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
bootstart() {
|
bootstart() {
|
||||||
|
|
||||||
|
|
@ -1240,7 +1243,7 @@ class AppUser extends AbstractApp
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setWindowTitle('');
|
this.setWindowTitle('');
|
||||||
if (!!Settings.settingsGet('Auth'))
|
if (Settings.settingsGet('Auth'))
|
||||||
{
|
{
|
||||||
Globals.$html.addClass('rl-user-auth');
|
Globals.$html.addClass('rl-user-auth');
|
||||||
|
|
||||||
|
|
@ -1255,7 +1258,7 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
this.setWindowTitle(Translator.i18n('TITLES/LOADING'));
|
this.setWindowTitle(Translator.i18n('TITLES/LOADING'));
|
||||||
|
|
||||||
//require.ensure([], function() { // require code splitting
|
// require.ensure([], function() { // require code splitting
|
||||||
|
|
||||||
this.foldersReload((value) => {
|
this.foldersReload((value) => {
|
||||||
|
|
||||||
|
|
@ -1319,8 +1322,8 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
kn.startScreens([
|
kn.startScreens([
|
||||||
require('Screen/User/MailBox'),
|
require('Screen/User/MailBox'),
|
||||||
Settings.capa(Enums.Capa.Settings) ? require('Screen/User/Settings') : null,
|
Settings.capa(Enums.Capa.Settings) ? require('Screen/User/Settings') : null
|
||||||
false ? require('Screen/User/About') : null
|
// false ? require('Screen/User/About') : null
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (bGoogle || bFacebook || bTwitter)
|
if (bGoogle || bFacebook || bTwitter)
|
||||||
|
|
@ -1381,7 +1384,7 @@ class AppUser extends AbstractApp
|
||||||
window.navigator.registerProtocolHandler('mailto',
|
window.navigator.registerProtocolHandler('mailto',
|
||||||
window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
|
window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
|
||||||
'' + (Settings.settingsGet('Title') || 'RainLoop'));
|
'' + (Settings.settingsGet('Title') || 'RainLoop'));
|
||||||
} catch(e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
|
|
||||||
if (Settings.settingsGet('MailToEmail'))
|
if (Settings.settingsGet('MailToEmail'))
|
||||||
{
|
{
|
||||||
|
|
@ -1394,7 +1397,7 @@ class AppUser extends AbstractApp
|
||||||
{
|
{
|
||||||
_.defer(() => this.initVerticalLayoutResizer(Enums.ClientSideKeyName.FolderListSize));
|
_.defer(() => this.initVerticalLayoutResizer(Enums.ClientSideKeyName.FolderListSize));
|
||||||
|
|
||||||
if (Tinycon && Settings.settingsGet('FaviconStatus') && !Settings.settingsGet('Filtered') )
|
if (Tinycon && Settings.settingsGet('FaviconStatus') && !Settings.settingsGet('Filtered'))
|
||||||
{
|
{
|
||||||
Tinycon.setOptions({
|
Tinycon.setOptions({
|
||||||
fallback: false
|
fallback: false
|
||||||
|
|
@ -1412,7 +1415,7 @@ class AppUser extends AbstractApp
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//}); // require code splitting
|
// }); // require code splitting
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class Audio
|
||||||
this.player = this.createNewObject();
|
this.player = this.createNewObject();
|
||||||
|
|
||||||
this.supported = !Globals.bMobileDevice && !Globals.bSafari && !!this.player && !!this.player.play;
|
this.supported = !Globals.bMobileDevice && !Globals.bSafari && !!this.player && !!this.player.play;
|
||||||
if (this.supported && this.player.canPlayType)
|
if (this.supported && this.player.canPlayType)
|
||||||
{
|
{
|
||||||
this.supportedMp3 = '' !== this.player.canPlayType('audio/mpeg;').replace(/no/, '');
|
this.supportedMp3 = '' !== this.player.canPlayType('audio/mpeg;').replace(/no/, '');
|
||||||
this.supportedWav = '' !== this.player.canPlayType('audio/wav; codecs="1"').replace(/no/, '');
|
this.supportedWav = '' !== this.player.canPlayType('audio/wav; codecs="1"').replace(/no/, '');
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
const BASE_64_CHR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
const BASE_64_CHR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||||
|
|
||||||
/*jslint bitwise: true*/
|
/* jslint bitwise: true */
|
||||||
|
/* eslint-disable */
|
||||||
const Base64 = {
|
const Base64 = {
|
||||||
|
|
||||||
// public method for urlsafe encoding
|
// public method for urlsafe encoding
|
||||||
|
|
@ -164,4 +165,5 @@ const Base64 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Base64;
|
module.exports = Base64;
|
||||||
/*jslint bitwise: false*/
|
/* jslint bitwise: false */
|
||||||
|
/* eslint-enable */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
import {_} from 'common';
|
import {_} from 'common';
|
||||||
import {Capa, MessageSetAction} from 'Common/Enums';
|
import {Capa, MessageSetAction} from 'Common/Enums';
|
||||||
import Utils from 'Common/Utils';
|
import Utils from 'Common/Utils';
|
||||||
|
|
@ -239,17 +238,17 @@ class CacheUserStorage
|
||||||
if (0 < message.threads().length)
|
if (0 < message.threads().length)
|
||||||
{
|
{
|
||||||
const unseenSubUid = _.find(message.threads(), (sSubUid) => {
|
const unseenSubUid = _.find(message.threads(), (sSubUid) => {
|
||||||
if (uid !== sSubUid){
|
if (uid !== sSubUid) {
|
||||||
const flags = this.getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
|
const subFlags = this.getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
|
||||||
return flags && 0 < flags.length && !!flags[0];
|
return subFlags && 0 < subFlags.length && !!subFlags[0];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
const flaggedSubUid = _.find(message.threads(), (sSubUid) => {
|
const flaggedSubUid = _.find(message.threads(), (sSubUid) => {
|
||||||
if (uid !== sSubUid) {
|
if (uid !== sSubUid) {
|
||||||
const flags = this.getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
|
const subFlags = this.getMessageFlagsFromCache(message.folderFullNameRaw, sSubUid);
|
||||||
return flags && 0 < flags.length && !!flags[1];
|
return subFlags && 0 < subFlags.length && !!subFlags[1];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
@ -269,7 +268,7 @@ class CacheUserStorage
|
||||||
this.setMessageFlagsToCache(
|
this.setMessageFlagsToCache(
|
||||||
message.folderFullNameRaw, message.uid,
|
message.folderFullNameRaw, message.uid,
|
||||||
[message.unseen(), message.flagged(), message.answered(), message.forwarded(),
|
[message.unseen(), message.flagged(), message.answered(), message.forwarded(),
|
||||||
message.isReadReceipt(), message.deletedMark()]
|
message.isReadReceipt(), message.deletedMark()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,19 +22,25 @@ class CookieDriver
|
||||||
const storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME);
|
const storageValue = $.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME);
|
||||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
|
||||||
(storageResult || (storageResult = {}))[key] = data;
|
(storageResult || (storageResult = {}))[key] = data;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME, JSON.stringify(storageResult), {
|
$.cookie(CLIENT_SIDE_STORAGE_INDEX_NAME, JSON.stringify(storageResult), {
|
||||||
'expires': 30
|
expires: 30
|
||||||
});
|
});
|
||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -43,7 +49,7 @@ class CookieDriver
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
get(sKey) {
|
get(key) {
|
||||||
|
|
||||||
let result = null;
|
let result = null;
|
||||||
|
|
||||||
|
|
@ -56,10 +62,13 @@ class CookieDriver
|
||||||
|
|
||||||
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null;
|
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
|
||||||
return mResult;
|
return result;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@ class LocalStorageDriver
|
||||||
const storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null;
|
const storageValue = window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] || null;
|
||||||
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
storageResult = null === storageValue ? null : JSON.parse(storageValue);
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
|
||||||
(storageResult || (storageResult = {}))[key] = data;
|
(storageResult || (storageResult = {}))[key] = data;
|
||||||
|
|
||||||
|
|
@ -31,7 +34,10 @@ class LocalStorageDriver
|
||||||
window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] = JSON.stringify(storageResult);
|
window.localStorage[CLIENT_SIDE_STORAGE_INDEX_NAME] = JSON.stringify(storageResult);
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
catch (e) {}
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -51,9 +57,12 @@ class LocalStorageDriver
|
||||||
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
storageResult = null === storageValue ? null : JSON.parse(storageValue)
|
||||||
;
|
;
|
||||||
|
|
||||||
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null
|
result = (storageResult && !Utils.isUnd(storageResult[key])) ? storageResult[key] : null;
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
}
|
}
|
||||||
catch (e) {}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
|
/* eslint max-len: 0 */
|
||||||
|
|
||||||
export const MESSAGES_PER_PAGE = 20;
|
export const MESSAGES_PER_PAGE = 20;
|
||||||
|
|
||||||
export const MESSAGES_PER_PAGE_VALUES = [10, 20, 30, 50, 100/*, 150, 200, 300*/];
|
export const MESSAGES_PER_PAGE_VALUES = [10, 20, 30, 50, 100];
|
||||||
|
|
||||||
export const CONTACTS_PER_PAGE = 50;
|
export const CONTACTS_PER_PAGE = 50;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
|
/* eslint quote-props: 0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
|
|
@ -18,7 +20,7 @@ export const FileType = {
|
||||||
'Certificate': 'certificate',
|
'Certificate': 'certificate',
|
||||||
'CertificateBin': 'certificate-bin',
|
'CertificateBin': 'certificate-bin',
|
||||||
'Archive': 'archive'
|
'Archive': 'archive'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -28,7 +30,7 @@ export const StorageResultType = {
|
||||||
'Abort': 'abort',
|
'Abort': 'abort',
|
||||||
'Error': 'error',
|
'Error': 'error',
|
||||||
'Unload': 'unload'
|
'Unload': 'unload'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -38,7 +40,7 @@ export const Focused = {
|
||||||
'MessageList': 'message-list',
|
'MessageList': 'message-list',
|
||||||
'MessageView': 'message-view',
|
'MessageView': 'message-view',
|
||||||
'FolderList': 'folder-list'
|
'FolderList': 'folder-list'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -47,7 +49,7 @@ export const State = {
|
||||||
'Empty': 10,
|
'Empty': 10,
|
||||||
'Login': 20,
|
'Login': 20,
|
||||||
'Auth': 30
|
'Auth': 30
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -55,7 +57,7 @@ export const State = {
|
||||||
export const StateType = {
|
export const StateType = {
|
||||||
'Webmail': 0,
|
'Webmail': 0,
|
||||||
'Admin': 1
|
'Admin': 1
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -87,7 +89,7 @@ export const Capa = {
|
||||||
'AutoLogout': 'AUTOLOGOUT',
|
'AutoLogout': 'AUTOLOGOUT',
|
||||||
'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS',
|
'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS',
|
||||||
'Identities': 'IDENTITIES'
|
'Identities': 'IDENTITIES'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -107,7 +109,7 @@ export const KeyState = {
|
||||||
'PopupViewOpenPGP': 'view-open-pgp',
|
'PopupViewOpenPGP': 'view-open-pgp',
|
||||||
'PopupKeyboardShortcutsHelp': 'popup-keyboard-shortcuts-help',
|
'PopupKeyboardShortcutsHelp': 'popup-keyboard-shortcuts-help',
|
||||||
'PopupAsk': 'popup-ask'
|
'PopupAsk': 'popup-ask'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -121,7 +123,7 @@ export const FolderType = {
|
||||||
'Archive': 15,
|
'Archive': 15,
|
||||||
'NotSpam': 80,
|
'NotSpam': 80,
|
||||||
'User': 99
|
'User': 99
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -136,7 +138,7 @@ export const ServerFolderType = {
|
||||||
'IMPORTANT': 10,
|
'IMPORTANT': 10,
|
||||||
'FLAGGED': 11,
|
'FLAGGED': 11,
|
||||||
'ALL': 12
|
'ALL': 12
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -145,7 +147,7 @@ export const LoginSignMeTypeAsString = {
|
||||||
'DefaultOff': 'defaultoff',
|
'DefaultOff': 'defaultoff',
|
||||||
'DefaultOn': 'defaulton',
|
'DefaultOn': 'defaulton',
|
||||||
'Unused': 'unused'
|
'Unused': 'unused'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -154,7 +156,7 @@ export const LoginSignMeType = {
|
||||||
'DefaultOff': 0,
|
'DefaultOff': 0,
|
||||||
'DefaultOn': 1,
|
'DefaultOn': 1,
|
||||||
'Unused': 2
|
'Unused': 2
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -167,7 +169,7 @@ export const ComposeType = {
|
||||||
'ForwardAsAttachment': 'forward-as-attachment',
|
'ForwardAsAttachment': 'forward-as-attachment',
|
||||||
'Draft': 'draft',
|
'Draft': 'draft',
|
||||||
'EditAsNew': 'editasnew'
|
'EditAsNew': 'editasnew'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -181,7 +183,7 @@ export const UploadErrorCode = {
|
||||||
'FileOnSaveingError': 5,
|
'FileOnSaveingError': 5,
|
||||||
'FileType': 98,
|
'FileType': 98,
|
||||||
'Unknown': 99
|
'Unknown': 99
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -193,7 +195,7 @@ export const SetSystemFoldersNotification = {
|
||||||
'Spam': 3,
|
'Spam': 3,
|
||||||
'Trash': 4,
|
'Trash': 4,
|
||||||
'Archive': 5
|
'Archive': 5
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -208,7 +210,7 @@ export const ClientSideKeyName = {
|
||||||
'LastReplyAction': 6,
|
'LastReplyAction': 6,
|
||||||
'LastSignMe': 7,
|
'LastSignMe': 7,
|
||||||
'ComposeLastIdentityID': 8
|
'ComposeLastIdentityID': 8
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -231,7 +233,7 @@ export const EventKeyCode = {
|
||||||
'Delete': 46,
|
'Delete': 46,
|
||||||
'A': 65,
|
'A': 65,
|
||||||
'S': 83
|
'S': 83
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -241,7 +243,7 @@ export const MessageSetAction = {
|
||||||
'UnsetSeen': 1,
|
'UnsetSeen': 1,
|
||||||
'SetFlag': 2,
|
'SetFlag': 2,
|
||||||
'UnsetFlag': 3
|
'UnsetFlag': 3
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -254,7 +256,7 @@ export const MessageSelectAction = {
|
||||||
'Seen': 4,
|
'Seen': 4,
|
||||||
'Flagged': 5,
|
'Flagged': 5,
|
||||||
'Unflagged': 6
|
'Unflagged': 6
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -264,7 +266,7 @@ export const DesktopNotification = {
|
||||||
'NotAllowed': 1,
|
'NotAllowed': 1,
|
||||||
'Denied': 2,
|
'Denied': 2,
|
||||||
'NotSupported': 9
|
'NotSupported': 9
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -273,7 +275,7 @@ export const MessagePriority = {
|
||||||
'Low': 5,
|
'Low': 5,
|
||||||
'Normal': 3,
|
'Normal': 3,
|
||||||
'High': 1
|
'High': 1
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -283,7 +285,7 @@ export const EditorDefaultType = {
|
||||||
'Plain': 'Plain',
|
'Plain': 'Plain',
|
||||||
'HtmlForced': 'HtmlForced',
|
'HtmlForced': 'HtmlForced',
|
||||||
'PlainForced': 'PlainForced'
|
'PlainForced': 'PlainForced'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -292,7 +294,7 @@ export const ServerSecure = {
|
||||||
'None': 0,
|
'None': 0,
|
||||||
'SSL': 1,
|
'SSL': 1,
|
||||||
'TLS': 2
|
'TLS': 2
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -302,7 +304,7 @@ export const SearchDateType = {
|
||||||
'Days3': 3,
|
'Days3': 3,
|
||||||
'Days7': 7,
|
'Days7': 7,
|
||||||
'Month': 30
|
'Month': 30
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -312,7 +314,7 @@ export const SaveSettingsStep = {
|
||||||
'Idle': -1,
|
'Idle': -1,
|
||||||
'TrueResult': 1,
|
'TrueResult': 1,
|
||||||
'FalseResult': 0
|
'FalseResult': 0
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -322,7 +324,7 @@ export const Layout = {
|
||||||
'SidePreview': 1,
|
'SidePreview': 1,
|
||||||
'BottomPreview': 2,
|
'BottomPreview': 2,
|
||||||
'Mobile': 3
|
'Mobile': 3
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -333,7 +335,7 @@ export const FilterConditionField = {
|
||||||
'Subject': 'Subject',
|
'Subject': 'Subject',
|
||||||
'Header': 'Header',
|
'Header': 'Header',
|
||||||
'Size': 'Size'
|
'Size': 'Size'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -345,7 +347,7 @@ export const FilterConditionType = {
|
||||||
'NotEqualTo': 'NotEqualTo',
|
'NotEqualTo': 'NotEqualTo',
|
||||||
'Over': 'Over',
|
'Over': 'Over',
|
||||||
'Under': 'Under'
|
'Under': 'Under'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -357,7 +359,7 @@ export const FiltersAction = {
|
||||||
'Vacation': 'Vacation',
|
'Vacation': 'Vacation',
|
||||||
'Reject': 'Reject',
|
'Reject': 'Reject',
|
||||||
'Forward': 'Forward'
|
'Forward': 'Forward'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
|
|
@ -365,7 +367,7 @@ export const FiltersAction = {
|
||||||
export const FilterRulesType = {
|
export const FilterRulesType = {
|
||||||
'All': 'All',
|
'All': 'All',
|
||||||
'Any': 'Any'
|
'Any': 'Any'
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -377,7 +379,7 @@ export const SignedVerifyStatus = {
|
||||||
'Error': -1,
|
'Error': -1,
|
||||||
'None': 0,
|
'None': 0,
|
||||||
'Success': 1
|
'Success': 1
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -409,7 +411,7 @@ export const ContactPropertyType = {
|
||||||
'Note': 110,
|
'Note': 110,
|
||||||
|
|
||||||
'Custom': 250
|
'Custom': 250
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
|
|
@ -489,4 +491,4 @@ export const Notification = {
|
||||||
|
|
||||||
'UnknownNotification': 999,
|
'UnknownNotification': 999,
|
||||||
'UnknownError': 999
|
'UnknownError': 999
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
import {window, _} from 'common';
|
import {window, _, $} from 'common';
|
||||||
import Globals from 'Common/Globals';
|
import Globals from 'Common/Globals';
|
||||||
import Settings from 'Storage/Settings';
|
import Settings from 'Storage/Settings';
|
||||||
|
|
||||||
|
|
@ -70,9 +70,9 @@ class HtmlEditor
|
||||||
if (this.editor)
|
if (this.editor)
|
||||||
{
|
{
|
||||||
this.editor.execCommand('insertSignature', {
|
this.editor.execCommand('insertSignature', {
|
||||||
'isHtml': html,
|
isHtml: html,
|
||||||
'insertBefore': insertBefore,
|
insertBefore: insertBefore,
|
||||||
'signature': signature
|
signature: signature
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -117,12 +117,11 @@ class HtmlEditor
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = wrapIsHtml ?
|
result = wrapIsHtml ?
|
||||||
'<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' +
|
'<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' +
|
||||||
this.editor.getData() + '</div>' : this.editor.getData();
|
this.editor.getData() + '</div>' : this.editor.getData();
|
||||||
}
|
}
|
||||||
}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
catch (e) {}
|
|
||||||
|
|
||||||
if (clearSignatureSigns)
|
if (clearSignatureSigns)
|
||||||
{
|
{
|
||||||
|
|
@ -160,7 +159,7 @@ class HtmlEditor
|
||||||
this.editor.setMode('plain');
|
this.editor.setMode('plain');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
|
|
||||||
if (resize)
|
if (resize)
|
||||||
{
|
{
|
||||||
|
|
@ -189,7 +188,7 @@ class HtmlEditor
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.editor.setData(html);
|
this.editor.setData(html);
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
|
|
||||||
if (focus)
|
if (focus)
|
||||||
{
|
{
|
||||||
|
|
@ -204,7 +203,7 @@ class HtmlEditor
|
||||||
try {
|
try {
|
||||||
this.editor.setData(
|
this.editor.setData(
|
||||||
this.editor.getData().replace(find, replaceHtml));
|
this.editor.getData().replace(find, replaceHtml));
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,13 +213,13 @@ class HtmlEditor
|
||||||
this.modeToggle(false);
|
this.modeToggle(false);
|
||||||
if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain)
|
if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain)
|
||||||
{
|
{
|
||||||
return this.editor.__plain.setRawData(plain);
|
this.editor.__plain.setRawData(plain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.editor.setData(plain);
|
this.editor.setData(plain);
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (focus)
|
if (focus)
|
||||||
|
|
@ -254,7 +253,7 @@ class HtmlEditor
|
||||||
|
|
||||||
if (!biti)
|
if (!biti)
|
||||||
{
|
{
|
||||||
config.removePlugins += (config.removePlugins ? ',' : '') + 'bidi';
|
config.removePlugins += (config.removePlugins ? ',' : '') + 'bidi';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -294,7 +293,7 @@ class HtmlEditor
|
||||||
|
|
||||||
if (window.FileReader)
|
if (window.FileReader)
|
||||||
{
|
{
|
||||||
this.editor.on('drop', (event) => {
|
this.editor.on('drop', (event) => {
|
||||||
if (0 < event.data.dataTransfer.getFilesCount())
|
if (0 < event.data.dataTransfer.getFilesCount())
|
||||||
{
|
{
|
||||||
const file = event.data.dataTransfer.getFile(0);
|
const file = event.data.dataTransfer.getFile(0);
|
||||||
|
|
@ -304,7 +303,7 @@ class HtmlEditor
|
||||||
var
|
var
|
||||||
id = event.data.dataTransfer.id,
|
id = event.data.dataTransfer.id,
|
||||||
imageId = `[img=${id}]`,
|
imageId = `[img=${id}]`,
|
||||||
reader = new window.FileReader()
|
reader = new window.FileReader()
|
||||||
;
|
;
|
||||||
|
|
||||||
reader.onloadend = () => {
|
reader.onloadend = () => {
|
||||||
|
|
@ -361,7 +360,7 @@ class HtmlEditor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.editor.focus();
|
this.editor.focus();
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -370,7 +369,7 @@ class HtmlEditor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return !!this.editor.focusManager.hasFocus;
|
return !!this.editor.focusManager.hasFocus;
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -381,7 +380,7 @@ class HtmlEditor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.editor.focusManager.blur(true);
|
this.editor.focusManager.blur(true);
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -390,7 +389,7 @@ class HtmlEditor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.editor.resize(this.$element.width(), this.$element.innerHeight());
|
this.editor.resize(this.$element.width(), this.$element.innerHeight());
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -399,7 +398,7 @@ class HtmlEditor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
this.editor.setReadOnly(!!value);
|
this.editor.setReadOnly(!!value);
|
||||||
} catch (e) {}
|
} catch (e) {/* eslint-disable-line no-empty */}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@ class Links
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
sound(fileName) {
|
sound(fileName) {
|
||||||
return this.sStaticPrefix + 'sounds/' + fileName;
|
return this.sStaticPrefix + 'sounds/' + fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
|
/* eslint key-spacing: 0 */
|
||||||
|
/* eslint quote-props: 0 */
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
'eml' : 'message/rfc822',
|
'eml' : 'message/rfc822',
|
||||||
'mime' : 'message/rfc822',
|
'mime' : 'message/rfc822',
|
||||||
'txt' : 'text/plain',
|
'txt' : 'text/plain',
|
||||||
|
|
@ -159,5 +161,4 @@ module.exports = {
|
||||||
// open office
|
// open office
|
||||||
'odt' : 'application/vnd.oasis.opendocument.text',
|
'odt' : 'application/vnd.oasis.opendocument.text',
|
||||||
'ods' : 'application/vnd.oasis.opendocument.spreadsheet'
|
'ods' : 'application/vnd.oasis.opendocument.spreadsheet'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,11 @@ class Momentor
|
||||||
return m.fromNow();
|
return m.fromNow();
|
||||||
case now.format('L') === m.format('L'):
|
case now.format('L') === m.format('L'):
|
||||||
return Translator.i18n('MESSAGE_LIST/TODAY_AT', {
|
return Translator.i18n('MESSAGE_LIST/TODAY_AT', {
|
||||||
'TIME': m.format('LT')
|
TIME: m.format('LT')
|
||||||
});
|
});
|
||||||
case now.clone().subtract('days', 1).format('L') === m.format('L'):
|
case now.clone().subtract('days', 1).format('L') === m.format('L'):
|
||||||
return Translator.i18n('MESSAGE_LIST/YESTERDAY_AT', {
|
return Translator.i18n('MESSAGE_LIST/YESTERDAY_AT', {
|
||||||
'TIME': m.format('LT')
|
TIME: m.format('LT')
|
||||||
});
|
});
|
||||||
case now.year() === m.year():
|
case now.year() === m.year():
|
||||||
return m.format('D MMM.');
|
return m.format('D MMM.');
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class Selector
|
||||||
|
|
||||||
this.listChecked = ko.computed(() => {
|
this.listChecked = ko.computed(() => {
|
||||||
return _.filter(this.list(), (item) => item.checked());
|
return _.filter(this.list(), (item) => item.checked());
|
||||||
}, this).extend({'rateLimit': 0});
|
}, this).extend({rateLimit: 0});
|
||||||
|
|
||||||
this.isListChecked = ko.computed(() => 0 < this.listChecked().length);
|
this.isListChecked = ko.computed(() => 0 < this.listChecked().length);
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@ class Selector
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.selectedItem = this.selectedItem.extend({'toggleSubscribe': [null,
|
this.selectedItem = this.selectedItem.extend({toggleSubscribe: [null,
|
||||||
(prev) => {
|
(prev) => {
|
||||||
if (prev)
|
if (prev)
|
||||||
{
|
{
|
||||||
|
|
@ -91,7 +91,7 @@ class Selector
|
||||||
}
|
}
|
||||||
]});
|
]});
|
||||||
|
|
||||||
this.focusedItem = this.focusedItem.extend({'toggleSubscribe': [null,
|
this.focusedItem = this.focusedItem.extend({toggleSubscribe: [null,
|
||||||
(prev) => {
|
(prev) => {
|
||||||
if (prev)
|
if (prev)
|
||||||
{
|
{
|
||||||
|
|
@ -291,14 +291,14 @@ class Selector
|
||||||
{
|
{
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
(this.oCallbacks['onItemSelect'] || this.emptyFunction)(item || null);
|
(this.oCallbacks.onItemSelect || this.emptyFunction)(item || null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
(this.oCallbacks['onItemSelect'] || this.emptyFunction)(item);
|
(this.oCallbacks.onItemSelect || this.emptyFunction)(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -416,14 +416,14 @@ class Selector
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
autoSelect() {
|
autoSelect() {
|
||||||
return !!(this.oCallbacks['onAutoSelect'] || this.emptyTrueFunction)();
|
return !!(this.oCallbacks.onAutoSelect || this.emptyTrueFunction)();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} up
|
* @param {boolean} up
|
||||||
*/
|
*/
|
||||||
doUpUpOrDownDown(up) {
|
doUpUpOrDownDown(up) {
|
||||||
(this.oCallbacks['onUpUpOrDownDown'] || this.emptyTrueFunction)(!!up);
|
(this.oCallbacks.onUpUpOrDownDown || this.emptyTrueFunction)(!!up);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -434,7 +434,7 @@ class Selector
|
||||||
|
|
||||||
let uid = '';
|
let uid = '';
|
||||||
|
|
||||||
const getItemUidCallback = this.oCallbacks['onItemGetUid'] || null;
|
const getItemUidCallback = this.oCallbacks.onItemGetUid || null;
|
||||||
if (getItemUidCallback && item)
|
if (getItemUidCallback && item)
|
||||||
{
|
{
|
||||||
uid = getItemUidCallback(item);
|
uid = getItemUidCallback(item);
|
||||||
|
|
@ -465,18 +465,22 @@ class Selector
|
||||||
{
|
{
|
||||||
if (!oFocused)
|
if (!oFocused)
|
||||||
{
|
{
|
||||||
if (EventKeyCode.Down === iEventKeyCode || EventKeyCode.Insert === iEventKeyCode || EventKeyCode.Space === iEventKeyCode || EventKeyCode.Home === iEventKeyCode || EventKeyCode.PageUp === iEventKeyCode)
|
if (EventKeyCode.Down === iEventKeyCode || EventKeyCode.Insert === iEventKeyCode ||
|
||||||
|
EventKeyCode.Space === iEventKeyCode || EventKeyCode.Home === iEventKeyCode ||
|
||||||
|
EventKeyCode.PageUp === iEventKeyCode)
|
||||||
{
|
{
|
||||||
oResult = aList[0];
|
oResult = aList[0];
|
||||||
}
|
}
|
||||||
else if (EventKeyCode.Up === iEventKeyCode || EventKeyCode.End === iEventKeyCode || EventKeyCode.PageDown === iEventKeyCode)
|
else if (EventKeyCode.Up === iEventKeyCode || EventKeyCode.End === iEventKeyCode ||
|
||||||
|
EventKeyCode.PageDown === iEventKeyCode)
|
||||||
{
|
{
|
||||||
oResult = aList[aList.length - 1];
|
oResult = aList[aList.length - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (oFocused)
|
else if (oFocused)
|
||||||
{
|
{
|
||||||
if (EventKeyCode.Down === iEventKeyCode || EventKeyCode.Up === iEventKeyCode || EventKeyCode.Insert === iEventKeyCode || EventKeyCode.Space === iEventKeyCode)
|
if (EventKeyCode.Down === iEventKeyCode || EventKeyCode.Up === iEventKeyCode ||
|
||||||
|
EventKeyCode.Insert === iEventKeyCode || EventKeyCode.Space === iEventKeyCode)
|
||||||
{
|
{
|
||||||
_.each(aList, (item) => {
|
_.each(aList, (item) => {
|
||||||
if (!bStop)
|
if (!bStop)
|
||||||
|
|
@ -649,7 +653,7 @@ class Selector
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.oContentScrollable.stop().animate({'scrollTop': 0}, 200);
|
this.oContentScrollable.stop().animate({scrollTop: 0}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ class Translator
|
||||||
notificationI18N = {};
|
notificationI18N = {};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.data = window['rainloopI18N'] || {};
|
this.data = window.rainloopI18N || {};
|
||||||
this.trigger = ko.observable(false);
|
this.trigger = ko.observable(false);
|
||||||
this.i18n = _.bind(this.i18n, this);
|
this.i18n = _.bind(this.i18n, this);
|
||||||
this.init();
|
this.init();
|
||||||
|
|
@ -27,9 +27,14 @@ class Translator
|
||||||
|
|
||||||
let
|
let
|
||||||
valueName = '',
|
valueName = '',
|
||||||
result = _.isUndefined(this.data[key]) ? (_.isUndefined(defaulValue) ? key : defaulValue) : this.data[key]
|
result = this.data[key]
|
||||||
;
|
;
|
||||||
|
|
||||||
|
if (_.isUndefined(result))
|
||||||
|
{
|
||||||
|
result = _.isUndefined(defaulValue) ? key : defaulValue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_.isUndefined(valueList) && !_.isNull(valueList))
|
if (!_.isUndefined(valueList) && !_.isNull(valueList))
|
||||||
{
|
{
|
||||||
for (valueName in valueList)
|
for (valueName in valueList)
|
||||||
|
|
@ -92,16 +97,21 @@ class Translator
|
||||||
if (animate && Globals.bAnimationSupported)
|
if (animate && Globals.bAnimationSupported)
|
||||||
{
|
{
|
||||||
$('.i18n-animation[data-i18n]', elements).letterfx({
|
$('.i18n-animation[data-i18n]', elements).letterfx({
|
||||||
'fx': 'fall fade', 'backwards': false, 'timing': 50, 'fx_duration': '50ms', 'letter_end': 'restore', 'element_end': 'restore'
|
fx: 'fall fade',
|
||||||
|
backwards: false,
|
||||||
|
timing: 50,
|
||||||
|
fx_duration: '50ms',
|
||||||
|
letter_end: 'restore',
|
||||||
|
element_end: 'restore'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
reloadData() {
|
reloadData() {
|
||||||
if (window['rainloopI18N'])
|
if (window.rainloopI18N)
|
||||||
{
|
{
|
||||||
this.data = window['rainloopI18N'] || {};
|
this.data = window.rainloopI18N || {};
|
||||||
|
|
||||||
this.i18nToNodes(window.document, true);
|
this.i18nToNodes(window.document, true);
|
||||||
|
|
||||||
|
|
@ -109,7 +119,7 @@ class Translator
|
||||||
this.trigger(!this.trigger());
|
this.trigger(!this.trigger());
|
||||||
}
|
}
|
||||||
|
|
||||||
window['rainloopI18N'] = null;
|
window.rainloopI18N = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
initNotificationLanguage() {
|
initNotificationLanguage() {
|
||||||
|
|
@ -299,9 +309,9 @@ class Translator
|
||||||
Globals.$html.addClass('rl-changing-language');
|
Globals.$html.addClass('rl-changing-language');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'url': require('Common/Links').langLink(language, admin),
|
url: require('Common/Links').langLink(language, admin),
|
||||||
'dataType': 'script',
|
dataType: 'script',
|
||||||
'cache': true
|
cache: true
|
||||||
})
|
})
|
||||||
.fail(fail || Utils.emptyFunction)
|
.fail(fail || Utils.emptyFunction)
|
||||||
.done(function () {
|
.done(function () {
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,21 @@
|
||||||
Utils.isNull = _.isNull;
|
Utils.isNull = _.isNull;
|
||||||
Utils.emptyFunction = Utils.noop = function () {};
|
Utils.emptyFunction = Utils.noop = function () {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Function} callback
|
||||||
|
*/
|
||||||
|
Utils.silentTryCatch = function (callback)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {*} oValue
|
* @param {*} oValue
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
|
|
@ -576,16 +591,17 @@
|
||||||
Utils.createCommand = function (oContext, fExecute, fCanExecute)
|
Utils.createCommand = function (oContext, fExecute, fCanExecute)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
|
fResult = Utils.emptyFunction,
|
||||||
fNonEmpty = function () {
|
fNonEmpty = function () {
|
||||||
if (fResult && fResult.canExecute && fResult.canExecute())
|
if (fResult && fResult.canExecute && fResult.canExecute())
|
||||||
{
|
{
|
||||||
fExecute.apply(oContext, Array.prototype.slice.call(arguments));
|
fExecute.apply(oContext, Array.prototype.slice.call(arguments));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
}
|
||||||
fResult = fExecute ? fNonEmpty : Utils.emptyFunction
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
fResult = fExecute ? fNonEmpty : Utils.emptyFunction;
|
||||||
fResult.enabled = ko.observable(true);
|
fResult.enabled = ko.observable(true);
|
||||||
|
|
||||||
fCanExecute = Utils.isUnd(fCanExecute) ? true : fCanExecute;
|
fCanExecute = Utils.isUnd(fCanExecute) ? true : fCanExecute;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class AbstracRadio extends AbstractComponent
|
||||||
if (params.values)
|
if (params.values)
|
||||||
{
|
{
|
||||||
this.values(_.map(params.values, (label, value) => {
|
this.values(_.map(params.values, (label, value) => {
|
||||||
return {'label': label, 'value': value};
|
return {label: label, value: value};
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ class AbstracRadio extends AbstractComponent
|
||||||
{
|
{
|
||||||
this.value(value.value);
|
this.value(value.value);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {AbstracRadio, AbstracRadio as default};
|
export {AbstracRadio, AbstracRadio as default};
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,6 @@ const componentExportHelper = (ClassObject, templateID = '') => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
export {AbstractComponent, componentExportHelper};
|
export {AbstractComponent, componentExportHelper};
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class AbstractInput extends AbstractComponent
|
||||||
' ' + Utils.trim('settings-saved-trigger-input ' + this.classForTrigger()) : ''
|
' ' + Utils.trim('settings-saved-trigger-input ' + this.classForTrigger()) : ''
|
||||||
;
|
;
|
||||||
|
|
||||||
return (0 < size ? 'span' + size : '') + suffixValue;
|
return (size > 0 ? 'span' + size : '') + suffixValue;
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ class CheckboxMaterialDesignComponent extends AbstracCheckbox
|
||||||
|
|
||||||
super(params);
|
super(params);
|
||||||
|
|
||||||
this.animationBox = ko.observable(false).extend({'falseTimeout': 200});
|
this.animationBox = ko.observable(false).extend({falseTimeout: 200});
|
||||||
this.animationCheckmark = ko.observable(false).extend({'falseTimeout': 200});
|
this.animationCheckmark = ko.observable(false).extend({falseTimeout: 200});
|
||||||
|
|
||||||
this.animationBoxSetTrue = _.bind(this.animationBoxSetTrue, this);
|
this.animationBoxSetTrue = _.bind(this.animationBoxSetTrue, this);
|
||||||
this.animationCheckmarkSetTrue = _.bind(this.animationCheckmarkSetTrue, this);
|
this.animationCheckmarkSetTrue = _.bind(this.animationCheckmarkSetTrue, this);
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class SaveTriggerComponent extends AbstractComponent
|
||||||
;
|
;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = componentExportHelper(SaveTriggerComponent, 'SaveTriggerComponent');
|
module.exports = componentExportHelper(SaveTriggerComponent, 'SaveTriggerComponent');
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ let
|
||||||
getUtl = () => {
|
getUtl = () => {
|
||||||
if (!cachedUrl)
|
if (!cachedUrl)
|
||||||
{
|
{
|
||||||
const version = $('#rlAppVersion').attr('content') || '0.0.0'; // TODO
|
const version = $('#rlAppVersion').attr('content') || '0.0.0';
|
||||||
cachedUrl = `rainloop/v/${version}/static/css/svg/icons.svg`;
|
cachedUrl = `rainloop/v/${version}/static/css/svg/icons.svg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
class AbstractBoot
|
class AbstractBoot
|
||||||
{
|
{
|
||||||
bootstart(Remote) {}
|
bootstart() {
|
||||||
|
// eslint-disable-line no-empty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {AbstractBoot, AbstractBoot as default};
|
export {AbstractBoot, AbstractBoot as default};
|
||||||
|
|
|
||||||
|
|
@ -86,17 +86,17 @@
|
||||||
this.user = this.users[index];
|
this.user = this.users[index];
|
||||||
this.email = this.emails[index];
|
this.email = this.emails[index];
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
OpenPgpKeyModel.prototype.selectUser = function (sUser)
|
OpenPgpKeyModel.prototype.selectUser = function (sUser)
|
||||||
{
|
{
|
||||||
this.select(sUser, 'users');
|
this.select(sUser, 'users');
|
||||||
}
|
};
|
||||||
|
|
||||||
OpenPgpKeyModel.prototype.selectEmail = function (sEmail)
|
OpenPgpKeyModel.prototype.selectEmail = function (sEmail)
|
||||||
{
|
{
|
||||||
this.select(sEmail, 'emails');
|
this.select(sEmail, 'emails');
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = OpenPgpKeyModel;
|
module.exports = OpenPgpKeyModel;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import Utils from 'Common/Utils';
|
||||||
class SettingsStorage
|
class SettingsStorage
|
||||||
{
|
{
|
||||||
constructor() {
|
constructor() {
|
||||||
this.settings = window['rainloopAppData'] || {};
|
this.settings = window.rainloopAppData || {};
|
||||||
this.settings = Utils.isNormal(this.settings) ? this.settings : {};
|
this.settings = Utils.isNormal(this.settings) ? this.settings : {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ class SettingsStorage
|
||||||
capa(name) {
|
capa(name) {
|
||||||
const values = this.settingsGet('Capa');
|
const values = this.settingsGet('Capa');
|
||||||
return Utils.isArray(values) && Utils.isNormal(name) && -1 < Utils.inArray(name, values);
|
return Utils.isArray(values) && Utils.isNormal(name) && -1 < Utils.inArray(name, values);
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = new SettingsStorage();
|
module.exports = new SettingsStorage();
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class AppAdminStore extends AbstractAppStore
|
||||||
|
|
||||||
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
|
this.weakPassword(!!Settings.settingsGet('WeakPassword'));
|
||||||
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
|
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = new AppAdminStore();
|
module.exports = new AppAdminStore();
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ class AppUserStore extends AbstractAppStore
|
||||||
|
|
||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
|
default:
|
||||||
|
break;
|
||||||
case Focused.MessageList:
|
case Focused.MessageList:
|
||||||
Globals.keyScope(KeyState.MessageList);
|
Globals.keyScope(KeyState.MessageList);
|
||||||
break;
|
break;
|
||||||
|
|
@ -66,7 +68,7 @@ class AppUserStore extends AbstractAppStore
|
||||||
|
|
||||||
this.devEmail = Settings.settingsGet('DevEmail');
|
this.devEmail = Settings.settingsGet('DevEmail');
|
||||||
this.devPassword = Settings.settingsGet('DevPassword');
|
this.devPassword = Settings.settingsGet('DevPassword');
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = new AppUserStore();
|
module.exports = new AppUserStore();
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ class IdentityUserStore
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
this.identities = ko.observableArray([]);
|
this.identities = ko.observableArray([]);
|
||||||
this.identities.loading = ko.observable(false).extend({'throttle': 100});
|
this.identities.loading = ko.observable(false).extend({throttle: 100});
|
||||||
|
|
||||||
this.identitiesIDS = ko.computed(() => {
|
this.identitiesIDS = ko.computed(() => {
|
||||||
return _.compact(_.map(this.identities(), (item) => item ? item.id : null));
|
return _.compact(_.map(this.identities(), (item) => item ? item.id : null));
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,11 @@
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
|
|
||||||
&.disabled,
|
.btn.disabled &, .btn[disabled] &{
|
||||||
.disabled & {
|
|
||||||
color: grey;
|
color: grey;
|
||||||
|
&.icon-white {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,6 @@
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.optionsCaption = Translator.i18n('PGP_NOTIFICATIONS/ADD_A_PUBLICK_KEY');
|
this.optionsCaption = Translator.i18n('PGP_NOTIFICATIONS/ADD_A_PUBLICK_KEY');
|
||||||
this.addOptionClass = function (oDomOption, oItem)
|
|
||||||
{
|
|
||||||
self.defautOptionsAfterRender(oDomOption, oItem);
|
|
||||||
|
|
||||||
if (oItem) {
|
|
||||||
oDomOption.classList.add(oItem['class']);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.notification = ko.observable('');
|
this.notification = ko.observable('');
|
||||||
|
|
||||||
|
|
@ -276,6 +268,16 @@
|
||||||
kn.extendAsViewModel(['View/Popup/ComposeOpenPgp', 'PopupsComposeOpenPgpViewModel'], ComposeOpenPgpPopupView);
|
kn.extendAsViewModel(['View/Popup/ComposeOpenPgp', 'PopupsComposeOpenPgpViewModel'], ComposeOpenPgpPopupView);
|
||||||
_.extend(ComposeOpenPgpPopupView.prototype, AbstractView.prototype);
|
_.extend(ComposeOpenPgpPopupView.prototype, AbstractView.prototype);
|
||||||
|
|
||||||
|
ComposeOpenPgpPopupView.prototype.addOptionClass = function (oDomOption, oItem)
|
||||||
|
{
|
||||||
|
this.defautOptionsAfterRender(oDomOption, oItem);
|
||||||
|
|
||||||
|
if (oItem)
|
||||||
|
{
|
||||||
|
oDomOption.classList.add(oItem['class']);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
ComposeOpenPgpPopupView.prototype.deletePublickKey = function (oKey)
|
ComposeOpenPgpPopupView.prototype.deletePublickKey = function (oKey)
|
||||||
{
|
{
|
||||||
this.encryptKeys.remove(oKey);
|
this.encryptKeys.remove(oKey);
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ export default (App) => {
|
||||||
;
|
;
|
||||||
|
|
||||||
// export
|
// export
|
||||||
|
/* eslint dot-notation: 0 */
|
||||||
window['rl'] = window['rl'] || {};
|
window['rl'] = window['rl'] || {};
|
||||||
window['rl']['i18n'] = _.bind(Translator.i18n, Translator);
|
window['rl']['i18n'] = _.bind(Translator.i18n, Translator);
|
||||||
|
|
||||||
|
|
@ -82,4 +83,4 @@ export default (App) => {
|
||||||
|
|
||||||
}, 10));
|
}, 10));
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
|
||||||
13
gulpfile.js
13
gulpfile.js
|
|
@ -440,7 +440,7 @@ gulp.task('js:chunks', ['js:webpack'], function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// - min
|
// - min
|
||||||
gulp.task('js:min', ['js:app', 'js:admin', 'js:chunks'], function() {
|
gulp.task('js:min', ['js:app', 'js:admin', 'js:chunks', 'js:validate'], function() {
|
||||||
return gulp.src(cfg.paths.staticJS + '*.js')
|
return gulp.src(cfg.paths.staticJS + '*.js')
|
||||||
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||||
.pipe(uglify(cfg.uglify))
|
.pipe(uglify(cfg.uglify))
|
||||||
|
|
@ -478,17 +478,14 @@ gulp.task('js:eslint', function() {
|
||||||
var eslint = require('gulp-eslint');
|
var eslint = require('gulp-eslint');
|
||||||
|
|
||||||
return gulp.src(cfg.paths.globjsxonly)
|
return gulp.src(cfg.paths.globjsxonly)
|
||||||
.pipe(eslint({
|
.pipe(eslint())
|
||||||
parser: 'babel-eslint',
|
|
||||||
rules: {
|
|
||||||
'strict': 0
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
.pipe(eslint.format())
|
.pipe(eslint.format())
|
||||||
.pipe(eslint.failAfterError())
|
.pipe(eslint.failAfterError())
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('js:validate', ['js:lint', 'js:eslint']);
|
||||||
|
|
||||||
// OTHER
|
// OTHER
|
||||||
regOtherMinTask('other:cookie', 'vendors/jquery-cookie/', 'jquery.cookie.js', 'jquery.cookie-1.4.0.min.js',
|
regOtherMinTask('other:cookie', 'vendors/jquery-cookie/', 'jquery.cookie.js', 'jquery.cookie-1.4.0.min.js',
|
||||||
'/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n');
|
'/*! jquery.cookie v1.4.0 (c) 2013 Klaus Hartl | MIT */\n');
|
||||||
|
|
@ -743,6 +740,8 @@ gulp.task('watch+', ['fast+'], function() {
|
||||||
gulp.task('build', ['rainloop']);
|
gulp.task('build', ['rainloop']);
|
||||||
gulp.task('build+', ['rainloop+']);
|
gulp.task('build+', ['rainloop+']);
|
||||||
|
|
||||||
|
gulp.task('js:v', ['js:validate']);
|
||||||
|
|
||||||
gulp.task('w', ['watch']);
|
gulp.task('w', ['watch']);
|
||||||
gulp.task('w+', ['watch+']);
|
gulp.task('w+', ['watch+']);
|
||||||
gulp.task('f', ['fast']);
|
gulp.task('f', ['fast']);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.9.4",
|
"version": "1.9.4",
|
||||||
"release": "402",
|
"release": "415",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
"plugins"
|
"plugins"
|
||||||
],
|
],
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"ownCloudPackageVersion": "4.12",
|
"ownCloudPackageVersion": "4.14",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.10.0"
|
"node": ">= 0.10.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue