diff --git a/.eslintrc b/.eslintrc
index d1fe6ef29..a1662bdf5 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,156 +1,168 @@
{
- "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
- }
+ "ecmaFeatures": {
+ "modules": true
+ },
+ "env": {
+ "node": true,
+ "commonjs": true,
+ "es6": true,
+ "browser": true
+ },
+ "globals": {
+ "RL_COMMUNITY" : true,
+ "ko" : true,
+ "ssm" : true,
+ "moment" : true,
+ "ifvisible" : true,
+ "crossroads" : true,
+ "hasher" : true,
+ "key" : true,
+ "Jua" : true,
+ "_" : true,
+ "$" : true,
+ "Dropbox" : 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": 0,
+ "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,
+
+ "max-depth": 0,
+ "max-len": [2, 200],
+ "max-params": 0,
+ "max-statements": 0,
+ "no-plusplus": 0
+ }
}
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 969b1a4ad..000000000
--- a/.jshintrc
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "curly" : true,
- "eqeqeq" : true,
- "forin" : true,
- "immed" : true,
- "latedef" : true,
- "newcap" : true,
- "noarg" : true,
- "noempty" : true,
- "nonew" : true,
- "regexp" : true,
- "undef" : true,
- "strict" : true,
- "unused" : true,
-
- "asi" : false,
- "boss" : false,
- "debug" : false,
- "eqnull" : false,
- "es5" : false,
- "esnext" : false,
- "evil" : false,
- "expr" : false,
- "funcscope" : false,
- "globalstrict" : false,
- "iterator" : false,
- "lastsemic" : false,
- "laxbreak" : false,
- "laxcomma" : false,
- "loopfunc" : false,
- "multistr" : false,
- "onecase" : false,
- "proto" : false,
- "regexdash" : false,
- "scripturl" : false,
- "smarttabs" : false,
- "shadow" : false,
- "supernew" : false,
- "validthis" : false,
- "passfail" : false,
- "nomen" : false,
- "white" : false,
-
- "sub" : true,
- "onevar" : true,
- "bitwise" : false,
- "plusplus" : false,
- "trailing" : false,
- "devel" : false,
- "browser" : true,
- "jquery" : true,
-
- "globals": {
- "RL_COMMUNITY" : true,
- "module" : true,
- "require" : true,
- "ko" : true,
- "ko" : true,
- "ssm" : true,
- "moment" : true,
- "ifvisible" : true,
- "crossroads" : true,
- "hasher" : true,
- "key" : true,
- "Jua" : true,
- "_" : true,
- "Dropbox" : true
- }
-}
diff --git a/dev/App/Abstract.jsx b/dev/App/Abstract.jsx
index ddb174b92..1208bfdc1 100644
--- a/dev/App/Abstract.jsx
+++ b/dev/App/Abstract.jsx
@@ -18,11 +18,6 @@ import {AbstractBoot} from 'Knoin/AbstractBoot';
class AbstractApp extends AbstractBoot
{
- googlePreviewSupportedCache = null;
- isLocalAutocomplete = true;
- iframe = null;
- lastErrorTime = 0;
-
/**
* @param {RemoteStorage|AdminRemoteStorage} Remote
*/
@@ -30,6 +25,11 @@ class AbstractApp extends AbstractBoot
{
super();
+ this.googlePreviewSupportedCache = null;
+ this.isLocalAutocomplete = true;
+ this.iframe = null;
+ this.lastErrorTime = 0;
+
this.iframe = $('').appendTo('body');
$win.on('error', (event) => {
diff --git a/dev/App/User.jsx b/dev/App/User.jsx
index ab80bfffd..c77b861be 100644
--- a/dev/App/User.jsx
+++ b/dev/App/User.jsx
@@ -56,12 +56,12 @@ import {AbstractApp} from 'App/Abstract';
class AppUser extends AbstractApp
{
- oMoveCache = {};
-
constructor()
{
super(Remote);
+ this.moveCache = {};
+
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
this.moveOrDeleteResponseHelper = _.bind(this.moveOrDeleteResponseHelper, this);
@@ -235,7 +235,7 @@ class AppUser extends AbstractApp
sSpamFolder = FolderStore.spamFolder()
;
- _.each(this.oMoveCache, (oItem) => {
+ _.each(this.moveCache, (oItem) => {
var
bSpam = sSpamFolder === oItem.To,
@@ -247,22 +247,22 @@ class AppUser extends AbstractApp
bSpam ? 'SPAM' : (bHam ? 'HAM' : ''), bSpam || bTrash);
});
- this.oMoveCache = {};
+ this.moveCache = {};
}
messagesMoveHelper(sFromFolderFullNameRaw, sToFolderFullNameRaw, aUidForMove) {
var sH = '$$' + sFromFolderFullNameRaw + '$$' + sToFolderFullNameRaw + '$$';
- if (!this.oMoveCache[sH])
+ if (!this.moveCache[sH])
{
- this.oMoveCache[sH] = {
+ this.moveCache[sH] = {
From: sFromFolderFullNameRaw,
To: sToFolderFullNameRaw,
Uid: []
};
}
- this.oMoveCache[sH].Uid = _.union(this.oMoveCache[sH].Uid, aUidForMove);
+ this.moveCache[sH].Uid = _.union(this.moveCache[sH].Uid, aUidForMove);
this.messagesMoveTrigger();
}
diff --git a/dev/Common/Audio.jsx b/dev/Common/Audio.jsx
index f308d028e..31dde0f4b 100644
--- a/dev/Common/Audio.jsx
+++ b/dev/Common/Audio.jsx
@@ -7,17 +7,15 @@ import {trim} from 'Common/Utils';
class Audio
{
- player = null;
- notificator = null;
-
- supported = false;
- supportedMp3 = false;
- supportedOgg = false;
- supportedWav = false;
- supportedNotification = false;
-
constructor()
{
+ this.notificator = null;
+
+ this.supportedMp3 = false;
+ this.supportedOgg = false;
+ this.supportedWav = false;
+ this.supportedNotification = false;
+
this.player = this.createNewObject();
this.supported = !bMobileDevice && !bSafari && !!this.player && !!this.player.play;
diff --git a/dev/Common/HtmlEditor.jsx b/dev/Common/HtmlEditor.jsx
index 7d0daad33..eda173acc 100644
--- a/dev/Common/HtmlEditor.jsx
+++ b/dev/Common/HtmlEditor.jsx
@@ -5,17 +5,6 @@ import * as Settings from 'Storage/Settings';
class HtmlEditor
{
- editor = null;
- $element = null;
-
- blurTimer = 0;
-
- onBlur = null;
- onReady = null;
- onModeChange = null;
-
- __inited = null;
-
/**
* @param {Object} element
* @param {Function=} onBlur
@@ -24,6 +13,9 @@ class HtmlEditor
*/
constructor(element, onBlur = null, onReady = null, onModeChange = null)
{
+ this.editor = null;
+ this.blurTimer = 0;
+
this.onBlur = onBlur;
this.onReady = onReady;
this.onModeChange = onModeChange;
diff --git a/dev/Common/Selector.jsx b/dev/Common/Selector.jsx
index 1c4103900..9b3c32a7a 100644
--- a/dev/Common/Selector.jsx
+++ b/dev/Common/Selector.jsx
@@ -708,7 +708,7 @@ class Selector
* @param {Object} item
* @param {Object=} event
*/
- actionClick = function (item, event = null) {
+ actionClick(item, event = null) {
if (item)
{
@@ -761,4 +761,3 @@ class Selector
}
export {Selector, Selector as default};
-module.exports = Selector;
diff --git a/dev/Component/Abstract.jsx b/dev/Component/Abstract.jsx
index a07acf657..d3cd191df 100644
--- a/dev/Component/Abstract.jsx
+++ b/dev/Component/Abstract.jsx
@@ -5,9 +5,9 @@ import ko from 'ko';
class AbstractComponent
{
- disposable = [];
-
- constructor() {}
+ constructor() {
+ this.disposable = [];
+ }
dispose() {
this.disposable.forEach((funcToDispose) => {
diff --git a/dev/External/ko.js b/dev/External/ko.js
index 2cc1fae17..96ed52f83 100644
--- a/dev/External/ko.js
+++ b/dev/External/ko.js
@@ -22,14 +22,14 @@
;
ko.bindingHandlers.updateWidth = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var
$w = $(window),
$oEl = $(oElement),
fValue = fValueAccessor(),
- fInit = function(){
+ fInit = function() {
fValue($oEl.width());
- window.setTimeout(function(){
+ window.setTimeout(function() {
fValue($oEl.width());
}, 500);
}
@@ -45,10 +45,10 @@
};
ko.bindingHandlers.editor = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var
- oEditor = null,
+ oEditor = null,
fValue = fValueAccessor(),
fUpdateEditorValue = function () {
@@ -88,16 +88,16 @@
};
ko.bindingHandlers.json = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
$(oElement).text(JSON.stringify(ko.unwrap(fValueAccessor())));
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
$(oElement).text(JSON.stringify(ko.unwrap(fValueAccessor())));
}
};
ko.bindingHandlers.scrollerShadows = {
- 'init': function (oElement) {
+ init: function (oElement) {
var
iLimit = 8,
@@ -126,7 +126,7 @@
};
ko.bindingHandlers.pikaday = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
ko.bindingHandlers.textInput.init.apply(oViewModel, Array.prototype.slice.call(arguments));
@@ -140,7 +140,7 @@
};
ko.bindingHandlers.tooltip = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var
bi18n = true,
@@ -203,7 +203,7 @@
}
}
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
bi18n = true,
@@ -236,7 +236,7 @@
};
ko.bindingHandlers.tooltipErrorTip = {
- 'init': function (oElement) {
+ init: function (oElement) {
var $oEl = $(oElement);
@@ -258,7 +258,7 @@
fDisposalTooltipHelper(oElement);
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
$oEl = $(oElement),
@@ -297,7 +297,7 @@
};
ko.bindingHandlers.registrateBootstrapDropdown = {
- 'init': function (oElement) {
+ init: function (oElement) {
var Globals = require('Common/Globals');
if (Globals && Globals.data.aBootstrapDropdowns)
{
@@ -314,7 +314,7 @@
};
ko.bindingHandlers.openDropdownTrigger = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
if (ko.unwrap(fValueAccessor()))
{
var $oEl = $(oElement);
@@ -332,7 +332,7 @@
};
ko.bindingHandlers.dropdownCloser = {
- 'init': function (oElement) {
+ init: function (oElement) {
$(oElement).closest('.dropdown').on('click', '.e-item', function () {
$(oElement).dropdown('toggle');
});
@@ -340,7 +340,7 @@
};
ko.bindingHandlers.popover = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
$(oElement).popover(ko.unwrap(fValueAccessor()));
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function () {
@@ -350,8 +350,8 @@
};
ko.bindingHandlers.csstext = {
- 'init': function (oElement, fValueAccessor) {
- if (oElement && oElement.styleSheet && undefined !== oElement.styleSheet.cssText)
+ init: function (oElement, fValueAccessor) {
+ if (oElement && oElement.styleSheet && (typeof oElement.styleSheet.cssText !== 'undefined'))
{
oElement.styleSheet.cssText = ko.unwrap(fValueAccessor());
}
@@ -360,8 +360,8 @@
$(oElement).text(ko.unwrap(fValueAccessor()));
}
},
- 'update': function (oElement, fValueAccessor) {
- if (oElement && oElement.styleSheet && undefined !== oElement.styleSheet.cssText)
+ update: function (oElement, fValueAccessor) {
+ if (oElement && oElement.styleSheet && (typeof oElement.styleSheet.cssText !== 'undefined'))
{
oElement.styleSheet.cssText = ko.unwrap(fValueAccessor());
}
@@ -373,7 +373,7 @@
};
ko.bindingHandlers.resizecrop = {
- 'init': function (oElement) {
+ init: function (oElement) {
$(oElement).addClass('resizecrop').resizecrop({
'width': '100',
'height': '100',
@@ -382,7 +382,7 @@
}
});
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
fValueAccessor()();
$(oElement).resizecrop({
'width': '100',
@@ -392,7 +392,7 @@
};
ko.bindingHandlers.onEnter = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keypress.koOnEnter', function (oEvent) {
if (oEvent && 13 === window.parseInt(oEvent.keyCode, 10))
{
@@ -408,7 +408,7 @@
};
ko.bindingHandlers.onSpace = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keyup.koOnSpace', function (oEvent) {
if (oEvent && 32 === window.parseInt(oEvent.keyCode, 10))
{
@@ -423,7 +423,7 @@
};
ko.bindingHandlers.onTab = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keydown.koOnTab', function (oEvent) {
if (oEvent && 9 === window.parseInt(oEvent.keyCode, 10))
{
@@ -438,7 +438,7 @@
};
ko.bindingHandlers.onEsc = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
$(oElement).on('keypress.koOnEsc', function (oEvent) {
if (oEvent && 27 === window.parseInt(oEvent.keyCode, 10))
{
@@ -454,7 +454,7 @@
};
ko.bindingHandlers.clickOnTrue = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
if (ko.unwrap(fValueAccessor()))
{
$(oElement).click();
@@ -463,7 +463,7 @@
};
ko.bindingHandlers.modal = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var
Globals = require('Common/Globals'),
@@ -487,11 +487,11 @@
;
});
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var Globals = require('Common/Globals');
- $(oElement).modal(!!ko.unwrap(fValueAccessor()) ? 'show' : 'hide');
+ $(oElement).modal(ko.unwrap(fValueAccessor()) ? 'show' : 'hide');
if (Globals.$html.hasClass('rl-anim'))
{
@@ -505,12 +505,12 @@
};
ko.bindingHandlers.moment = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
require('Common/Momentor').momentToNode(
$(oElement).addClass('moment').data('moment-time', ko.unwrap(fValueAccessor()))
);
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
require('Common/Momentor').momentToNode(
$(oElement).data('moment-time', ko.unwrap(fValueAccessor()))
);
@@ -518,50 +518,50 @@
};
ko.bindingHandlers.i18nInit = {
- 'init': function (oElement) {
+ init: function (oElement) {
require('Common/Translator').i18nToNodes(oElement);
}
};
ko.bindingHandlers.translatorInit = {
- 'init': function (oElement) {
+ init: function (oElement) {
require('Common/Translator').i18nToNodes(oElement);
}
};
ko.bindingHandlers.i18nUpdate = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
ko.unwrap(fValueAccessor());
require('Common/Translator').i18nToNodes(oElement);
}
};
ko.bindingHandlers.link = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
$(oElement).attr('href', ko.unwrap(fValueAccessor()));
}
};
ko.bindingHandlers.title = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
$(oElement).attr('title', ko.unwrap(fValueAccessor()));
}
};
ko.bindingHandlers.textF = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
$(oElement).text(ko.unwrap(fValueAccessor()));
}
};
ko.bindingHandlers.initDom = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
fValueAccessor()(oElement);
}
};
ko.bindingHandlers.initFixedTrigger = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var
aValues = ko.unwrap(fValueAccessor()),
$oContainer = null,
@@ -588,14 +588,14 @@
};
ko.bindingHandlers.initResizeTrigger = {
- 'init': function (oElement, fValueAccessor) {
+ init: function (oElement, fValueAccessor) {
var aValues = ko.unwrap(fValueAccessor());
$(oElement).css({
'height': aValues[1],
'min-height': aValues[1]
});
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
Utils = require('Common/Utils'),
@@ -625,13 +625,13 @@
};
ko.bindingHandlers.appendDom = {
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
$(oElement).hide().empty().append(ko.unwrap(fValueAccessor())).show();
}
};
ko.bindingHandlers.draggable = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor) {
var
Globals = require('Common/Globals'),
@@ -644,19 +644,19 @@
iTriggerZone = 100,
iScrollSpeed = 3,
fAllValueFunc = fAllBindingsAccessor(),
- sDroppableSelector = fAllValueFunc && fAllValueFunc['droppableSelector'] ? fAllValueFunc['droppableSelector'] : '',
+ sDroppableSelector = fAllValueFunc && fAllValueFunc.droppableSelector ? fAllValueFunc.droppableSelector : '',
oConf = {
- 'distance': 20,
- 'handle': '.dragHandle',
- 'cursorAt': {'top': 22, 'left': 3},
- 'refreshPositions': true,
- 'scroll': true
+ distance: 20,
+ handle: '.dragHandle',
+ cursorAt: {top: 22, left: 3},
+ refreshPositions: true,
+ scroll: true
}
;
if (sDroppableSelector)
{
- oConf['drag'] = function (oEvent) {
+ oConf.drag = function (oEvent) {
$(sDroppableSelector).each(function () {
var
@@ -697,7 +697,7 @@
});
};
- oConf['stop'] = function() {
+ oConf.stop = function() {
$(sDroppableSelector).each(function () {
window.clearInterval($(this).data('timerScroll'));
$(this).data('timerScroll', false);
@@ -705,7 +705,7 @@
};
}
- oConf['helper'] = function (oEvent) {
+ oConf.helper = function (oEvent) {
return fValueAccessor()(oEvent && oEvent.target ? ko.dataFor(oEvent.target) : null);
};
@@ -724,37 +724,37 @@
};
ko.bindingHandlers.droppable = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor) {
var Globals = require('Common/Globals');
if (!Globals.bMobileDevice)
{
var
fValueFunc = fValueAccessor(),
fAllValueFunc = fAllBindingsAccessor(),
- fOverCallback = fAllValueFunc && fAllValueFunc['droppableOver'] ? fAllValueFunc['droppableOver'] : null,
- fOutCallback = fAllValueFunc && fAllValueFunc['droppableOut'] ? fAllValueFunc['droppableOut'] : null,
+ fOverCallback = fAllValueFunc && fAllValueFunc.droppableOver ? fAllValueFunc.droppableOver : null,
+ fOutCallback = fAllValueFunc && fAllValueFunc.droppableOut ? fAllValueFunc.droppableOut : null,
oConf = {
- 'tolerance': 'pointer',
- 'hoverClass': 'droppableHover'
+ tolerance: 'pointer',
+ hoverClass: 'droppableHover'
}
;
if (fValueFunc)
{
- oConf['drop'] = function (oEvent, oUi) {
+ oConf.drop = function (oEvent, oUi) {
fValueFunc(oEvent, oUi);
};
if (fOverCallback)
{
- oConf['over'] = function (oEvent, oUi) {
+ oConf.over = function (oEvent, oUi) {
fOverCallback(oEvent, oUi);
};
}
if (fOutCallback)
{
- oConf['out'] = function (oEvent, oUi) {
+ oConf.out = function (oEvent, oUi) {
fOutCallback(oEvent, oUi);
};
}
@@ -770,7 +770,7 @@
};
ko.bindingHandlers.nano = {
- 'init': function (oElement) {
+ init: function (oElement) {
var
Globals = require('Common/Globals'),
@@ -791,7 +791,7 @@
};
ko.bindingHandlers.saveTrigger = {
- 'init': function (oElement) {
+ init: function (oElement) {
var $oEl = $(oElement);
@@ -808,7 +808,7 @@
$oEl.addClass('settings-saved-trigger-input');
}
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
mValue = ko.unwrap(fValueAccessor()),
$oEl = $(oElement)
@@ -870,7 +870,7 @@
};
ko.bindingHandlers.emailsTags = {
- 'init': function(oElement, fValueAccessor, fAllBindingsAccessor) {
+ init: function(oElement, fValueAccessor, fAllBindingsAccessor) {
var
Utils = require('Common/Utils'),
@@ -879,7 +879,7 @@
$oEl = $(oElement),
fValue = fValueAccessor(),
fAllBindings = fAllBindingsAccessor(),
- fAutoCompleteSource = fAllBindings['autoCompleteSource'] || null,
+ fAutoCompleteSource = fAllBindings.autoCompleteSource || null,
fFocusCallback = function (bValue) {
if (fValue && fValue.focused)
{
@@ -892,7 +892,7 @@
'parseOnBlur': true,
'allowDragAndDrop': true,
'focusCallback': fFocusCallback,
- 'inputDelimiters': [',', ';', "\n"],
+ 'inputDelimiters': [',', ';', '\n'],
'autoCompleteSource': fAutoCompleteSource,
// 'elementHook': function (oEl, oItem) {
// if (oEl && oItem)
@@ -977,11 +977,11 @@
if (fValue && fValue.focused && fValue.focused.subscribe)
{
fValue.focused.subscribe(function (bValue) {
- $oEl.inputosaurus(!!bValue ? 'focus' : 'blur');
+ $oEl.inputosaurus(bValue ? 'focus' : 'blur');
});
}
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
$oEl = $(oElement),
@@ -999,7 +999,7 @@
};
ko.bindingHandlers.command = {
- 'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
+ init: function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
var
jqElement = $(oElement),
oCommand = fValueAccessor()
@@ -1015,7 +1015,7 @@
.init.apply(oViewModel, Array.prototype.slice.call(arguments));
},
- 'update': function (oElement, fValueAccessor) {
+ update: function (oElement, fValueAccessor) {
var
bResult = true,
diff --git a/dev/Knoin/AbstractBoot.jsx b/dev/Knoin/AbstractBoot.jsx
index 8e818a519..be58999d0 100644
--- a/dev/Knoin/AbstractBoot.jsx
+++ b/dev/Knoin/AbstractBoot.jsx
@@ -1,7 +1,7 @@
class AbstractBoot
{
- bootstart() {/* eslint-disable-line no-empty */}
+ bootstart() {/* no-empty */}
}
export {AbstractBoot, AbstractBoot as default};
diff --git a/dev/Knoin/AbstractModel.js b/dev/Knoin/AbstractModel.js
index fa3eedce2..3597f09a5 100644
--- a/dev/Knoin/AbstractModel.js
+++ b/dev/Knoin/AbstractModel.js
@@ -46,4 +46,3 @@
module.exports = AbstractModel;
}());
-
diff --git a/dev/Knoin/AbstractScreen.js b/dev/Knoin/AbstractScreen.js
index 429c90f2c..72e2f1e1a 100644
--- a/dev/Knoin/AbstractScreen.js
+++ b/dev/Knoin/AbstractScreen.js
@@ -88,4 +88,4 @@
module.exports = AbstractScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Knoin/AbstractView.js b/dev/Knoin/AbstractView.js
index e5e2e7127..77314e893 100644
--- a/dev/Knoin/AbstractView.js
+++ b/dev/Knoin/AbstractView.js
@@ -127,4 +127,4 @@
module.exports = AbstractView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Knoin/Knoin.js b/dev/Knoin/Knoin.js
index 9b3ded211..bcb1dffeb 100644
--- a/dev/Knoin/Knoin.js
+++ b/dev/Knoin/Knoin.js
@@ -36,13 +36,13 @@
};
/**
- * @param {Object} thisObject
+ * @param {Object} context
*/
- Knoin.prototype.constructorEnd = function (thisObject)
+ Knoin.prototype.constructorEnd = function (context)
{
- if (Utils.isFunc(thisObject['__constructor_end']))
+ if (Utils.isFunc(context.__constructor_end))
{
- thisObject['__constructor_end'].call(thisObject);
+ context.__constructor_end.call(context);
}
};
@@ -77,13 +77,13 @@
Knoin.prototype.addSettingsViewModel = function (SettingsViewModelClass, sTemplate, sLabelName, sRoute, bDefault)
{
SettingsViewModelClass.__rlSettingsData = {
- 'Label': sLabelName,
- 'Template': sTemplate,
- 'Route': sRoute,
- 'IsDefault': !!bDefault
+ Label: sLabelName,
+ Template: sTemplate,
+ Route: sRoute,
+ IsDefault: !!bDefault
};
- Globals.aViewModels['settings'].push(SettingsViewModelClass);
+ Globals.aViewModels.settings.push(SettingsViewModelClass);
};
/**
@@ -287,7 +287,7 @@
var
self = this,
oScreen = null,
- bSameScreen= false,
+ bSameScreen = false,
oCross = null
;
@@ -509,4 +509,4 @@
module.exports = new Knoin();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Account.js b/dev/Model/Account.js
index 97de166d5..6c3f9b94a 100644
--- a/dev/Model/Account.js
+++ b/dev/Model/Account.js
@@ -49,4 +49,4 @@
module.exports = AccountModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Attachment.js b/dev/Model/Attachment.js
index 05d6b96f8..d6e30fd5b 100644
--- a/dev/Model/Attachment.js
+++ b/dev/Model/Attachment.js
@@ -550,4 +550,4 @@
module.exports = AttachmentModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/ComposeAttachment.js b/dev/Model/ComposeAttachment.js
index 3507db7e9..a6cf65aaa 100644
--- a/dev/Model/ComposeAttachment.js
+++ b/dev/Model/ComposeAttachment.js
@@ -127,4 +127,4 @@
module.exports = ComposeAttachmentModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Contact.js b/dev/Model/Contact.js
index 5c653361d..26d152918 100644
--- a/dev/Model/Contact.js
+++ b/dev/Model/Contact.js
@@ -73,16 +73,16 @@
var bResult = false;
if (oItem && 'Object/Contact' === oItem['@Object'])
{
- this.idContact = Utils.pInt(oItem['IdContact']);
- this.display = Utils.pString(oItem['Display']);
- this.readOnly = !!oItem['ReadOnly'];
+ this.idContact = Utils.pInt(oItem.IdContact);
+ this.display = Utils.pString(oItem.Display);
+ this.readOnly = !!oItem.ReadOnly;
- if (Utils.isNonEmptyArray(oItem['Properties']))
+ if (Utils.isNonEmptyArray(oItem.Properties))
{
- _.each(oItem['Properties'], function (oProperty) {
- if (oProperty && oProperty['Type'] && Utils.isNormal(oProperty['Value']) && Utils.isNormal(oProperty['TypeStr']))
+ _.each(oItem.Properties, function (oProperty) {
+ if (oProperty && oProperty.Type && Utils.isNormal(oProperty.Value) && Utils.isNormal(oProperty.TypeStr))
{
- this.properties.push([Utils.pInt(oProperty['Type']), Utils.pString(oProperty['Value']), Utils.pString(oProperty['TypeStr'])]);
+ this.properties.push([Utils.pInt(oProperty.Type), Utils.pString(oProperty.Value), Utils.pString(oProperty.TypeStr)]);
}
}, this);
}
@@ -137,4 +137,4 @@
module.exports = ContactModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/ContactProperty.js b/dev/Model/ContactProperty.js
index f93eb5d06..611ee69ac 100644
--- a/dev/Model/ContactProperty.js
+++ b/dev/Model/ContactProperty.js
@@ -34,8 +34,8 @@
this.placeholder = ko.observable(sPlaceholder || '');
this.placeholderValue = ko.computed(function () {
- var sPlaceholder = this.placeholder();
- return sPlaceholder ? Translator.i18n(sPlaceholder) : '';
+ var value = this.placeholder();
+ return value ? Translator.i18n(value) : '';
}, this);
this.largeValue = ko.computed(function () {
@@ -49,4 +49,4 @@
module.exports = ContactPropertyModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Email.js b/dev/Model/Email.js
index 9304c7d22..a2f042660 100644
--- a/dev/Model/Email.js
+++ b/dev/Model/Email.js
@@ -218,8 +218,12 @@
{
if (bWrapWithLink)
{
- sResult = Utils.encodeHtml('"' + this.name + '" <') +
- '') + '" target="_blank" tabindex="-1">' + Utils.encodeHtml(sResult) + '' + Utils.encodeHtml('>');
+ sResult = Utils.encodeHtml('"' + this.name + '" <') + '') +
+ '" target="_blank" tabindex="-1">' +
+ Utils.encodeHtml(sResult) +
+ '' +
+ Utils.encodeHtml('>');
}
else
{
@@ -268,9 +272,9 @@
substr_replace = function (str, replace, start, length) {
if (start < 0) {
- start = start + str.length;
+ start += str.length;
}
- length = length !== undefined ? length : str.length;
+ length = typeof length !== 'undefined' ? length : str.length;
if (length < 0) {
length = length + str.length - start;
}
@@ -399,4 +403,4 @@
module.exports = EmailModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Filter.js b/dev/Model/Filter.js
index 748f0c6c5..7e772d752 100644
--- a/dev/Model/Filter.js
+++ b/dev/Model/Filter.js
@@ -79,12 +79,12 @@
{
case Enums.FiltersAction.MoveTo:
sResult = Translator.i18n('SETTINGS_FILTERS/SUBNAME_MOVE_TO', {
- 'FOLDER': fGetRealFolderName(sActionValue)
+ FOLDER: fGetRealFolderName(sActionValue)
});
break;
case Enums.FiltersAction.Forward:
sResult = Translator.i18n('SETTINGS_FILTERS/SUBNAME_FORWARD_TO', {
- 'EMAIL': sActionValue
+ EMAIL: sActionValue
});
break;
case Enums.FiltersAction.Vacation:
@@ -211,23 +211,23 @@
FilterModel.prototype.toJson = function ()
{
return {
- 'ID': this.id,
- 'Enabled': this.enabled() ? '1' : '0',
- 'Name': this.name(),
- 'ConditionsType': this.conditionsType(),
- 'Conditions': _.map(this.conditions(), function (oItem) {
+ ID: this.id,
+ Enabled: this.enabled() ? '1' : '0',
+ Name: this.name(),
+ ConditionsType: this.conditionsType(),
+ Conditions: _.map(this.conditions(), function (oItem) {
return oItem.toJson();
}),
- 'ActionValue': this.actionValue(),
- 'ActionValueSecond': this.actionValueSecond(),
- 'ActionValueThird': this.actionValueThird(),
- 'ActionValueFourth': this.actionValueFourth(),
- 'ActionType': this.actionType(),
+ ActionValue: this.actionValue(),
+ ActionValueSecond: this.actionValueSecond(),
+ ActionValueThird: this.actionValueThird(),
+ ActionValueFourth: this.actionValueFourth(),
+ ActionType: this.actionType(),
- 'Stop': this.actionNoStop() ? '0' : '1',
- 'Keep': this.actionKeep() ? '1' : '0',
- 'MarkAsRead': this.actionMarkAsRead() ? '1' : '0'
+ Stop: this.actionNoStop() ? '0' : '1',
+ Keep: this.actionKeep() ? '1' : '0',
+ MarkAsRead: this.actionMarkAsRead() ? '1' : '0'
};
};
@@ -252,33 +252,33 @@
var bResult = false;
if (oItem && 'Object/Filter' === oItem['@Object'])
{
- this.id = Utils.pString(oItem['ID']);
- this.name(Utils.pString(oItem['Name']));
- this.enabled(!!oItem['Enabled']);
+ this.id = Utils.pString(oItem.ID);
+ this.name(Utils.pString(oItem.Name));
+ this.enabled(!!oItem.Enabled);
- this.conditionsType(Utils.pString(oItem['ConditionsType']));
+ this.conditionsType(Utils.pString(oItem.ConditionsType));
this.conditions([]);
- if (Utils.isNonEmptyArray(oItem['Conditions']))
+ if (Utils.isNonEmptyArray(oItem.Conditions))
{
- this.conditions(_.compact(_.map(oItem['Conditions'], function (aData) {
+ this.conditions(_.compact(_.map(oItem.Conditions, function (aData) {
var oFilterCondition = new FilterConditionModel();
return oFilterCondition && oFilterCondition.parse(aData) ?
oFilterCondition : null;
})));
}
- this.actionType(Utils.pString(oItem['ActionType']));
+ this.actionType(Utils.pString(oItem.ActionType));
- this.actionValue(Utils.pString(oItem['ActionValue']));
- this.actionValueSecond(Utils.pString(oItem['ActionValueSecond']));
- this.actionValueThird(Utils.pString(oItem['ActionValueThird']));
- this.actionValueFourth(Utils.pString(oItem['ActionValueFourth']));
+ this.actionValue(Utils.pString(oItem.ActionValue));
+ this.actionValueSecond(Utils.pString(oItem.ActionValueSecond));
+ this.actionValueThird(Utils.pString(oItem.ActionValueThird));
+ this.actionValueFourth(Utils.pString(oItem.ActionValueFourth));
- this.actionNoStop(!oItem['Stop']);
- this.actionKeep(!!oItem['Keep']);
- this.actionMarkAsRead(!!oItem['MarkAsRead']);
+ this.actionNoStop(!oItem.Stop);
+ this.actionKeep(!!oItem.Keep);
+ this.actionMarkAsRead(!!oItem.MarkAsRead);
bResult = true;
}
@@ -322,4 +322,4 @@
module.exports = FilterModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/FilterCondition.js b/dev/Model/FilterCondition.js
index e33ee9ade..5f6f3ca53 100644
--- a/dev/Model/FilterCondition.js
+++ b/dev/Model/FilterCondition.js
@@ -77,12 +77,12 @@
FilterConditionModel.prototype.parse = function (oItem)
{
- if (oItem && oItem['Field'] && oItem['Type'])
+ if (oItem && oItem.Field && oItem.Type)
{
- this.field(Utils.pString(oItem['Field']));
- this.type(Utils.pString(oItem['Type']));
- this.value(Utils.pString(oItem['Value']));
- this.valueSecond(Utils.pString(oItem['ValueSecond']));
+ this.field(Utils.pString(oItem.Field));
+ this.type(Utils.pString(oItem.Type));
+ this.value(Utils.pString(oItem.Value));
+ this.valueSecond(Utils.pString(oItem.ValueSecond));
return true;
}
@@ -93,10 +93,10 @@
FilterConditionModel.prototype.toJson = function ()
{
return {
- 'Field': this.field(),
- 'Type': this.type(),
- 'Value': this.value(),
- 'ValueSecond': this.valueSecond()
+ Field: this.field(),
+ Type: this.type(),
+ Value: this.value(),
+ ValueSecond: this.valueSecond()
};
};
@@ -114,4 +114,4 @@
module.exports = FilterConditionModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Folder.js b/dev/Model/Folder.js
index ee67902df..e085c8c2f 100644
--- a/dev/Model/Folder.js
+++ b/dev/Model/Folder.js
@@ -376,4 +376,4 @@
module.exports = FolderModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/Identity.js b/dev/Model/Identity.js
index d657fee64..6aeb29145 100644
--- a/dev/Model/Identity.js
+++ b/dev/Model/Identity.js
@@ -49,4 +49,4 @@
module.exports = IdentityModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/MessageFull.js b/dev/Model/MessageFull.js
index b4815dcf3..5c0e8fc7e 100644
--- a/dev/Model/MessageFull.js
+++ b/dev/Model/MessageFull.js
@@ -56,7 +56,7 @@
if (MessageSimpleModel.prototype.initByJson.call(this, oJson))
{
this.priority = Utils.pInt(oJson.Priority);
- this.priority = Utils.inArray(this.priority, [Enums.MessagePriority.High, Enums.MessagePriority.Low]) ?
+ this.priority = Utils.inArray(this.priority, [Enums.MessagePriority.High, Enums.MessagePriority.Low]) ?
this.priority : Enums.MessagePriority.Normal;
this.hash = Utils.pString(oJson.Hash);
@@ -86,4 +86,4 @@
module.exports = MessageFullModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/MessageSimple.js b/dev/Model/MessageSimple.js
index 276502760..a79520f09 100644
--- a/dev/Model/MessageSimple.js
+++ b/dev/Model/MessageSimple.js
@@ -171,4 +171,4 @@
module.exports = MessageSimpleModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Model/OpenPgpKey.js b/dev/Model/OpenPgpKey.js
index ea31c72dd..e74a7d314 100644
--- a/dev/Model/OpenPgpKey.js
+++ b/dev/Model/OpenPgpKey.js
@@ -108,3 +108,4 @@
module.exports = OpenPgpKeyModel;
}());
+
diff --git a/dev/Model/Template.js b/dev/Model/Template.js
index 765802dc2..520a5b231 100644
--- a/dev/Model/Template.js
+++ b/dev/Model/Template.js
@@ -61,10 +61,10 @@
var bResult = false;
if (oItem && 'Object/Template' === oItem['@Object'])
{
- this.id = Utils.pString(oItem['ID']);
- this.name = Utils.pString(oItem['Name']);
- this.body = Utils.pString(oItem['Body']);
- this.populated = !!oItem['Populated'];
+ this.id = Utils.pString(oItem.ID);
+ this.name = Utils.pString(oItem.Name);
+ this.body = Utils.pString(oItem.Body);
+ this.populated = !!oItem.Populated;
bResult = true;
}
@@ -74,4 +74,4 @@
module.exports = TemplateModel;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Promises/AbstractAjax.js b/dev/Promises/AbstractAjax.js
index b66042e94..95fcb87aa 100644
--- a/dev/Promises/AbstractAjax.js
+++ b/dev/Promises/AbstractAjax.js
@@ -71,7 +71,7 @@
if (bPost)
{
- oParameters['XToken'] = Settings.appSettingsGet('token');
+ oParameters.XToken = Settings.appSettingsGet('token');
}
Plugins.runHook('ajax-default-request', [sAction, oParameters, sAdditionalGetString]);
@@ -79,19 +79,19 @@
self.setTrigger(fTrigger, true);
oH = $.ajax({
- 'type': bPost ? 'POST' : 'GET',
- 'url': Links.ajax(sAdditionalGetString),
- 'async': true,
- 'dataType': 'json',
- 'data': bPost ? (oParameters || {}) : {},
- 'timeout': iTimeOut,
- 'global': true
+ type: bPost ? 'POST' : 'GET',
+ url: Links.ajax(sAdditionalGetString),
+ async: true,
+ dataType: 'json',
+ data: bPost ? (oParameters || {}) : {},
+ timeout: iTimeOut,
+ global: true
}).always(function (oData, sTextStatus) {
var bCached = false, oErrorData = null, sType = Enums.StorageResultType.Error;
- if (oData && oData['Time'])
+ if (oData && oData.Time)
{
- bCached = Utils.pInt(oData['Time']) > Utils.microtime() - iStart;
+ bCached = Utils.pInt(oData.Time) > Utils.microtime() - iStart;
}
// backward capability
@@ -172,7 +172,7 @@
{
if (Globals.data.__APP__ && Globals.data.__APP__.loginAndLogoutReload)
{
- Globals.data.__APP__.loginAndLogoutReload(false, true);
+ Globals.data.__APP__.loginAndLogoutReload(false, true);
}
}
@@ -213,14 +213,14 @@
return this.ajaxRequest(sAction, false, iTimeOut, null, sAdditionalGetString, fTrigger);
};
- AbstractAjaxPromises.prototype.postRequest = function (sAction, fTrigger, oParameters, iTimeOut)
+ AbstractAjaxPromises.prototype.postRequest = function (action, fTrigger, params, timeOut)
{
- oParameters = oParameters || {};
- oParameters['Action'] = sAction;
+ params = params || {};
+ params.Action = action;
- return this.ajaxRequest(sAction, true, iTimeOut, oParameters, '', fTrigger);
+ return this.ajaxRequest(action, true, timeOut, params, '', fTrigger);
};
module.exports = AbstractAjaxPromises;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Promises/AbstractBasic.js b/dev/Promises/AbstractBasic.js
index b8cc2a1da..bd8a7ffe0 100644
--- a/dev/Promises/AbstractBasic.js
+++ b/dev/Promises/AbstractBasic.js
@@ -49,4 +49,4 @@
module.exports = AbstractBasicPromises;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Promises/User/Ajax.js b/dev/Promises/User/Ajax.js
index 35f4f8477..1519a213f 100644
--- a/dev/Promises/User/Ajax.js
+++ b/dev/Promises/User/Ajax.js
@@ -91,4 +91,4 @@
module.exports = new UserAjaxUserPromises();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Promises/User/Populator.js b/dev/Promises/User/Populator.js
index c738cd6cb..09d73ed58 100644
--- a/dev/Promises/User/Populator.js
+++ b/dev/Promises/User/Populator.js
@@ -119,7 +119,7 @@
}
}
- aSubFolders = oFolder['SubFolders'];
+ aSubFolders = oFolder.SubFolders;
if (aSubFolders && 'Collection/FolderCollection' === aSubFolders['@Object'] &&
aSubFolders['@Collection'] && Utils.isArray(aSubFolders['@Collection']))
{
@@ -142,7 +142,7 @@
{
var
iLimit = Utils.pInt(Settings.appSettingsGet('folderSpecLimit')),
- iC = Utils.pInt(oData['CountRec'])
+ iC = Utils.pInt(oData.CountRec)
;
iLimit = 100 < iLimit ? 100 : (10 > iLimit ? 10 : iLimit);
@@ -169,7 +169,7 @@
var bUpdate = false;
- if (oData['SystemFolders'] && '' === '' +
+ if (oData.SystemFolders && '' === '' +
Settings.settingsGet('SentFolder') +
Settings.settingsGet('DraftFolder') +
Settings.settingsGet('SpamFolder') +
@@ -177,11 +177,11 @@
Settings.settingsGet('ArchiveFolder') +
Settings.settingsGet('NullFolder'))
{
- Settings.settingsSet('SentFolder', oData['SystemFolders'][Enums.ServerFolderType.SENT] || null);
- Settings.settingsSet('DraftFolder', oData['SystemFolders'][Enums.ServerFolderType.DRAFTS] || null);
- Settings.settingsSet('SpamFolder', oData['SystemFolders'][Enums.ServerFolderType.JUNK] || null);
- Settings.settingsSet('TrashFolder', oData['SystemFolders'][Enums.ServerFolderType.TRASH] || null);
- Settings.settingsSet('ArchiveFolder', oData['SystemFolders'][Enums.ServerFolderType.ALL] || null);
+ Settings.settingsSet('SentFolder', oData.SystemFolders[Enums.ServerFolderType.SENT] || null);
+ Settings.settingsSet('DraftFolder', oData.SystemFolders[Enums.ServerFolderType.DRAFTS] || null);
+ Settings.settingsSet('SpamFolder', oData.SystemFolders[Enums.ServerFolderType.JUNK] || null);
+ Settings.settingsSet('TrashFolder', oData.SystemFolders[Enums.ServerFolderType.TRASH] || null);
+ Settings.settingsSet('ArchiveFolder', oData.SystemFolders[Enums.ServerFolderType.ALL] || null);
bUpdate = true;
}
@@ -195,12 +195,12 @@
if (bUpdate)
{
require('Remote/User/Ajax').saveSystemFolders(Utils.noop, {
- 'SentFolder': FolderStore.sentFolder(),
- 'DraftFolder': FolderStore.draftFolder(),
- 'SpamFolder': FolderStore.spamFolder(),
- 'TrashFolder': FolderStore.trashFolder(),
- 'ArchiveFolder': FolderStore.archiveFolder(),
- 'NullFolder': 'NullFolder'
+ SentFolder: FolderStore.sentFolder(),
+ DraftFolder: FolderStore.draftFolder(),
+ SpamFolder: FolderStore.spamFolder(),
+ TrashFolder: FolderStore.trashFolder(),
+ ArchiveFolder: FolderStore.archiveFolder(),
+ NullFolder: 'NullFolder'
});
}
@@ -210,4 +210,4 @@
module.exports = new PromisesUserPopulator();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Remote/AbstractAjax.js b/dev/Remote/AbstractAjax.js
index f35481f14..99f7f4f79 100644
--- a/dev/Remote/AbstractAjax.js
+++ b/dev/Remote/AbstractAjax.js
@@ -65,7 +65,7 @@
{
if (Globals.data.__APP__ && Globals.data.__APP__.loginAndLogoutReload)
{
- Globals.data.__APP__.loginAndLogoutReload(false, true);
+ Globals.data.__APP__.loginAndLogoutReload(false, true);
}
}
@@ -75,9 +75,9 @@
{
Globals.data.__APP__.clearClientSideToken();
- if (!oData.ClearAuth && Globals.data.__APP__.loginAndLogoutReload)
+ if (!oData.ClearAuth && Globals.data.__APP__.loginAndLogoutReload)
{
- Globals.data.__APP__.loginAndLogoutReload(false, true);
+ Globals.data.__APP__.loginAndLogoutReload(false, true);
}
}
}
@@ -169,26 +169,26 @@
if (bPost)
{
- oParameters['XToken'] = Settings.appSettingsGet('token');
+ oParameters.XToken = Settings.appSettingsGet('token');
}
oDefAjax = $.ajax({
- 'type': bPost ? 'POST' : 'GET',
- 'url': Links.ajax(sGetAdd),
- 'async': true,
- 'dataType': 'json',
- 'data': bPost ? oParameters : {},
- 'headers': oHeaders,
- 'timeout': iTimeOut,
- 'global': true
+ type: bPost ? 'POST' : 'GET',
+ url: Links.ajax(sGetAdd),
+ async: true,
+ dataType: 'json',
+ data: bPost ? oParameters : {},
+ headers: oHeaders,
+ timeout: iTimeOut,
+ global: true
});
oDefAjax.always(function (oData, sType) {
var bCached = false;
- if (oData && oData['Time'])
+ if (oData && oData.Time)
{
- bCached = Utils.pInt(oData['Time']) > (new window.Date()).getTime() - iStart;
+ bCached = Utils.pInt(oData.Time) > (new window.Date()).getTime() - iStart;
}
if (sAction && self.oRequests[sAction])
@@ -308,4 +308,4 @@
module.exports = AbstractAjaxRemote;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Remote/Admin/Ajax.js b/dev/Remote/Admin/Ajax.js
index 6cdb5fe1a..38f5527c4 100644
--- a/dev/Remote/Admin/Ajax.js
+++ b/dev/Remote/Admin/Ajax.js
@@ -163,8 +163,8 @@
RemoteAdminStorage.prototype.domainDisable = function (fCallback, sName, bDisabled)
{
return this.defaultRequest(fCallback, 'AdminDomainDisable', {
- 'Name': sName,
- 'Disabled': !!bDisabled ? '1' : '0'
+ Name: sName,
+ Disabled: bDisabled ? '1' : '0'
});
};
@@ -184,7 +184,7 @@
RemoteAdminStorage.prototype.licensing = function (fCallback, bForce)
{
return this.defaultRequest(fCallback, 'AdminLicensing', {
- 'Force' : bForce ? '1' : '0'
+ Force: bForce ? '1' : '0'
});
};
@@ -196,8 +196,8 @@
RemoteAdminStorage.prototype.licensingActivate = function (fCallback, sDomain, sKey)
{
return this.defaultRequest(fCallback, 'AdminLicensingActivate', {
- 'Domain' : sDomain,
- 'Key' : sKey
+ Domain: sDomain,
+ Key: sKey
});
};
@@ -209,16 +209,16 @@
RemoteAdminStorage.prototype.pluginDisable = function (fCallback, sName, bDisabled)
{
return this.defaultRequest(fCallback, 'AdminPluginDisable', {
- 'Name': sName,
- 'Disabled': !!bDisabled ? '1' : '0'
+ Name: sName,
+ Disabled: bDisabled ? '1' : '0'
});
};
RemoteAdminStorage.prototype.createDomainAlias = function (fCallback, sName, sAlias)
{
this.defaultRequest(fCallback, 'AdminDomainAliasSave', {
- 'Name': sName,
- 'Alias': sAlias
+ Name: sName,
+ Alias: sAlias
});
};
@@ -305,4 +305,4 @@
module.exports = new RemoteAdminStorage();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Remote/User/Ajax.js b/dev/Remote/User/Ajax.js
index 8da2324af..c08407291 100644
--- a/dev/Remote/User/Ajax.js
+++ b/dev/Remote/User/Ajax.js
@@ -252,9 +252,11 @@
/**
* @param {?Function} fCallback
+ * @param {Array} aFilters
+ * @param {string} sRaw
+ * @param {boolean} bRawIsActive
*/
- RemoteUserAjax.prototype.filtersSave = function (fCallback,
- aFilters, sRaw, bRawIsActive)
+ RemoteUserAjax.prototype.filtersSave = function (fCallback, aFilters, sRaw, bRawIsActive)
{
this.defaultRequest(fCallback, 'FiltersSave', {
'Raw': sRaw,
@@ -282,7 +284,8 @@
};
/**
- * @param {?Function} fCallback
+ * @param {Function} fCallback
+ * @param {string} sID
*/
RemoteUserAjax.prototype.templateGetById = function (fCallback, sID)
{
@@ -292,7 +295,8 @@
};
/**
- * @param {?Function} fCallback
+ * @param {Function} fCallback
+ * @param {string} sID
*/
RemoteUserAjax.prototype.templateDelete = function (fCallback, sID)
{
@@ -302,7 +306,10 @@
};
/**
- * @param {?Function} fCallback
+ * @param {Function} fCallback
+ * @param {string} sID
+ * @param {string} sName
+ * @param {string} sBody
*/
RemoteUserAjax.prototype.templateSetup = function (fCallback, sID, sName, sBody)
{
@@ -314,7 +321,7 @@
};
/**
- * @param {?Function} fCallback
+ * @param {Function} fCallback
* @param {string} sFolderFullNameRaw
* @param {number=} iOffset = 0
* @param {number=} iLimit = 20
@@ -354,19 +361,17 @@
bUseThreads ? sThreadUid : ''
].join(String.fromCharCode(0))), bSilent ? [] : ['MessageList']);
}
- else
- {
- return this.defaultRequest(fCallback, 'MessageList', {
- 'Folder': sFolderFullNameRaw,
- 'Offset': iOffset,
- 'Limit': iLimit,
- 'Search': sSearch,
- 'UidNext': sInboxUidNext,
- 'UseThreads': bUseThreads ? '1' : '0',
- 'ThreadUid': bUseThreads ? sThreadUid : ''
- }, '' === sSearch ? Consts.DEFAULT_AJAX_TIMEOUT : Consts.SEARCH_AJAX_TIMEOUT,
- '', bSilent ? [] : ['MessageList']);
- }
+
+ return this.defaultRequest(fCallback, 'MessageList', {
+ Folder: sFolderFullNameRaw,
+ Offset: iOffset,
+ Limit: iLimit,
+ Search: sSearch,
+ UidNext: sInboxUidNext,
+ UseThreads: bUseThreads ? '1' : '0',
+ ThreadUid: bUseThreads ? sThreadUid : ''
+ }, '' === sSearch ? Consts.DEFAULT_AJAX_TIMEOUT : Consts.SEARCH_AJAX_TIMEOUT,
+ '', bSilent ? [] : ['MessageList']);
};
/**
@@ -554,6 +559,7 @@
* @param {string} sTo
* @param {string} sCc
* @param {string} sBcc
+ * @param {string} sReplyTo
* @param {string} sSubject
* @param {boolean} bTextIsHtml
* @param {string} sText
@@ -904,4 +910,4 @@
module.exports = new RemoteUserAjax();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/AbstractSettings.js b/dev/Screen/AbstractSettings.js
index 27d179cd2..80d886163 100644
--- a/dev/Screen/AbstractSettings.js
+++ b/dev/Screen/AbstractSettings.js
@@ -56,7 +56,7 @@
oViewModelDom = null
;
- RoutedSettingsViewModel = _.find(Globals.aViewModels['settings'], function (SettingsViewModel) {
+ RoutedSettingsViewModel = _.find(Globals.aViewModels.settings, function (SettingsViewModel) {
return SettingsViewModel && SettingsViewModel.__rlSettingsData &&
sSubName === SettingsViewModel.__rlSettingsData.Route;
});
@@ -165,17 +165,17 @@
AbstractSettingsScreen.prototype.onBuild = function ()
{
- _.each(Globals.aViewModels['settings'], function (SettingsViewModel) {
+ _.each(Globals.aViewModels.settings, function (SettingsViewModel) {
if (SettingsViewModel && SettingsViewModel.__rlSettingsData &&
!_.find(Globals.aViewModels['settings-removed'], function (RemoveSettingsViewModel) {
return RemoveSettingsViewModel && RemoveSettingsViewModel === SettingsViewModel;
}))
{
this.menu.push({
- 'route': SettingsViewModel.__rlSettingsData.Route,
- 'label': SettingsViewModel.__rlSettingsData.Label,
- 'selected': ko.observable(false),
- 'disabled': !!_.find(Globals.aViewModels['settings-disabled'], function (DisabledSettingsViewModel) {
+ route: SettingsViewModel.__rlSettingsData.Route,
+ label: SettingsViewModel.__rlSettingsData.Label,
+ selected: ko.observable(false),
+ disabled: !!_.find(Globals.aViewModels['settings-disabled'], function (DisabledSettingsViewModel) {
return DisabledSettingsViewModel && DisabledSettingsViewModel === SettingsViewModel;
})
});
@@ -188,13 +188,14 @@
AbstractSettingsScreen.prototype.routes = function ()
{
var
- DefaultViewModel = _.find(Globals.aViewModels['settings'], function (SettingsViewModel) {
- return SettingsViewModel && SettingsViewModel.__rlSettingsData && SettingsViewModel.__rlSettingsData['IsDefault'];
+ DefaultViewModel = _.find(Globals.aViewModels.settings, function (SettingsViewModel) {
+ return SettingsViewModel && SettingsViewModel.__rlSettingsData && SettingsViewModel.__rlSettingsData.IsDefault;
}),
- sDefaultRoute = DefaultViewModel ? DefaultViewModel.__rlSettingsData['Route'] : 'general',
+ sDefaultRoute = DefaultViewModel && DefaultViewModel.__rlSettingsData ?
+ DefaultViewModel.__rlSettingsData.Route : 'general',
oRules = {
- 'subname': /^(.*)$/,
- 'normalize_': function (oRequest, oVals) {
+ subname: /^(.*)$/,
+ normalize_: function (oRequest, oVals) {
oVals.subname = Utils.isUnd(oVals.subname) ? sDefaultRoute : Utils.pString(oVals.subname);
return [oVals.subname];
}
@@ -210,4 +211,4 @@
module.exports = AbstractSettingsScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/Admin/Login.js b/dev/Screen/Admin/Login.js
index 5c97a47e1..a3c4665cf 100644
--- a/dev/Screen/Admin/Login.js
+++ b/dev/Screen/Admin/Login.js
@@ -29,4 +29,4 @@
module.exports = LoginAdminScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/Admin/Settings.js b/dev/Screen/Admin/Settings.js
index 4fa07c4ad..3f9572d1c 100644
--- a/dev/Screen/Admin/Settings.js
+++ b/dev/Screen/Admin/Settings.js
@@ -93,4 +93,4 @@
module.exports = SettingsAdminScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/User/About.js b/dev/Screen/User/About.js
index 48a3aa3ad..a7accc789 100644
--- a/dev/Screen/User/About.js
+++ b/dev/Screen/User/About.js
@@ -29,4 +29,4 @@
module.exports = AboutUserScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/User/Login.js b/dev/Screen/User/Login.js
index 8d805e1f2..423fdc661 100644
--- a/dev/Screen/User/Login.js
+++ b/dev/Screen/User/Login.js
@@ -29,4 +29,4 @@
module.exports = LoginUserScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/User/MailBox.js b/dev/Screen/User/MailBox.js
index ecd95d37a..9fd3e2138 100644
--- a/dev/Screen/User/MailBox.js
+++ b/dev/Screen/User/MailBox.js
@@ -48,7 +48,7 @@
*/
MailBoxUserScreen.prototype.oLastRoute = {};
- MailBoxUserScreen.prototype.updateWindowTitle = function ()
+ MailBoxUserScreen.prototype.updateWindowTitle = function ()
{
var
sEmail = AccountStore.email(),
@@ -195,10 +195,10 @@
[/^([a-zA-Z0-9~]+)\/p([1-9][0-9]*)\/(.+)\/?$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9~]+)\/p([1-9][0-9]*)$/, {'normalize_': fNormS}],
[/^([a-zA-Z0-9~]+)\/(.+)\/?$/, {'normalize_': fNormD}],
- [/^([^\/]*)$/, {'normalize_': fNormS}]
+ [/^([^\/]*)$/, {'normalize_': fNormS}]
];
};
module.exports = MailBoxUserScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Screen/User/Settings.js b/dev/Screen/User/Settings.js
index 12a7114c5..288b66154 100644
--- a/dev/Screen/User/Settings.js
+++ b/dev/Screen/User/Settings.js
@@ -154,4 +154,4 @@
module.exports = SettingsUserScreen;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/About.js b/dev/Settings/Admin/About.js
index 9ba1da65f..ca992b977 100644
--- a/dev/Settings/Admin/About.js
+++ b/dev/Settings/Admin/About.js
@@ -99,4 +99,4 @@
module.exports = AboutAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Branding.js b/dev/Settings/Admin/Branding.js
index 135bc3963..b37b6c1e7 100644
--- a/dev/Settings/Admin/Branding.js
+++ b/dev/Settings/Admin/Branding.js
@@ -120,4 +120,4 @@
module.exports = BrandingAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Contacts.js b/dev/Settings/Admin/Contacts.js
index 2b748a5e4..0756f022b 100644
--- a/dev/Settings/Admin/Contacts.js
+++ b/dev/Settings/Admin/Contacts.js
@@ -50,15 +50,15 @@
}
;
- if (!!Settings.settingsGet('SQLiteIsSupported'))
+ if (Settings.settingsGet('SQLiteIsSupported'))
{
aSupportedTypes.push('sqlite');
}
- if (!!Settings.settingsGet('MySqlIsSupported'))
+ if (Settings.settingsGet('MySqlIsSupported'))
{
aSupportedTypes.push('mysql');
}
- if (!!Settings.settingsGet('PostgreSqlIsSupported'))
+ if (Settings.settingsGet('PostgreSqlIsSupported'))
{
aSupportedTypes.push('pgsql');
}
@@ -241,4 +241,4 @@
module.exports = ContactsAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Domains.js b/dev/Settings/Admin/Domains.js
index f48331fcd..c3aea3bda 100644
--- a/dev/Settings/Admin/Domains.js
+++ b/dev/Settings/Admin/Domains.js
@@ -83,4 +83,4 @@
module.exports = DomainsAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/General.js b/dev/Settings/Admin/General.js
index d793d08f5..28ed6d452 100644
--- a/dev/Settings/Admin/General.js
+++ b/dev/Settings/Admin/General.js
@@ -46,16 +46,16 @@
this.mainAttachmentLimit = ko.observable(Utils.pInt(Settings.settingsGet('AttachmentLimit')) / (1024 * 1024)).extend({'posInterer': 25});
this.uploadData = Settings.settingsGet('PhpUploadSizes');
- this.uploadDataDesc = this.uploadData && (this.uploadData['upload_max_filesize'] || this.uploadData['post_max_size']) ? [
- this.uploadData['upload_max_filesize'] ? 'upload_max_filesize = ' + this.uploadData['upload_max_filesize'] + '; ' : '',
- this.uploadData['post_max_size'] ? 'post_max_size = ' + this.uploadData['post_max_size'] : ''
+ this.uploadDataDesc = this.uploadData && (this.uploadData.upload_max_filesize || this.uploadData.post_max_size) ? [
+ this.uploadData.upload_max_filesize ? 'upload_max_filesize = ' + this.uploadData.upload_max_filesize + '; ' : '',
+ this.uploadData.post_max_size ? 'post_max_size = ' + this.uploadData.post_max_size : ''
].join('') : '';
this.themesOptions = ko.computed(function () {
return _.map(this.themes(), function (sTheme) {
return {
- 'optValue': sTheme,
- 'optText': Utils.convertThemeName(sTheme)
+ optValue: sTheme,
+ optText: Utils.convertThemeName(sTheme)
};
});
}, this);
@@ -208,4 +208,4 @@
module.exports = GeneralAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Login.js b/dev/Settings/Admin/Login.js
index c98fc3b1c..1a3c94998 100644
--- a/dev/Settings/Admin/Login.js
+++ b/dev/Settings/Admin/Login.js
@@ -71,4 +71,4 @@
module.exports = LoginAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Packages.js b/dev/Settings/Admin/Packages.js
index 216cceb28..deb566a71 100644
--- a/dev/Settings/Admin/Packages.js
+++ b/dev/Settings/Admin/Packages.js
@@ -26,16 +26,16 @@
this.packagesReal = PackageStore.packagesReal;
this.packagesMainUpdatable = PackageStore.packagesMainUpdatable;
- this.packagesCurrent = this.packages.filter(function (oItem) {
- return oItem && '' !== oItem['installed'] && !oItem['compare'];
+ this.packagesCurrent = this.packages.filter(function (item) {
+ return item && '' !== item.installed && !item.compare;
});
- this.packagesAvailableForUpdate = this.packages.filter(function (oItem) {
- return oItem && '' !== oItem['installed'] && !!oItem['compare'];
+ this.packagesAvailableForUpdate = this.packages.filter(function (item) {
+ return item && '' !== item.installed && !!item.compare;
});
- this.packagesAvailableForInstallation = this.packages.filter(function (oItem) {
- return oItem && '' === oItem['installed'];
+ this.packagesAvailableForInstallation = this.packages.filter(function (item) {
+ return item && '' === item.installed;
});
this.visibility = ko.computed(function () {
@@ -71,15 +71,15 @@
}
}
- _.each(self.packages(), function (oItem) {
- if (oItem && oPackage && oItem['loading']() && oPackage['file'] === oItem['file'])
+ _.each(self.packages(), function (item) {
+ if (item && oPackage && item.loading && item.loading() && oPackage.file === item.file)
{
- oPackage['loading'](false);
- oItem['loading'](false);
+ oPackage.loading(false);
+ item.loading(false);
}
});
- if (Enums.StorageResultType.Success === sResult && oData && oData.Result && oData.Result['Reload'])
+ if (Enums.StorageResultType.Success === sResult && oData && oData.Result && oData.Result.Reload)
{
window.location.reload();
}
@@ -94,7 +94,7 @@
{
if (oPackage)
{
- oPackage['loading'](true);
+ oPackage.loading(true);
Remote.packageDelete(this.requestHelper(oPackage, false), oPackage);
}
};
@@ -103,11 +103,11 @@
{
if (oPackage)
{
- oPackage['loading'](true);
+ oPackage.loading(true);
Remote.packageInstall(this.requestHelper(oPackage, true), oPackage);
}
};
module.exports = PackagesAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Plugins.js b/dev/Settings/Admin/Plugins.js
index 57deda684..fde7a3d89 100644
--- a/dev/Settings/Admin/Plugins.js
+++ b/dev/Settings/Admin/Plugins.js
@@ -116,4 +116,4 @@
module.exports = PluginsAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/Admin/Social.js b/dev/Settings/Admin/Social.js
index 35a40d25a..2c702c99d 100644
--- a/dev/Settings/Admin/Social.js
+++ b/dev/Settings/Admin/Social.js
@@ -180,4 +180,4 @@
module.exports = SocialAdminSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Accounts.js b/dev/Settings/User/Accounts.js
index dc7b6d72d..2cc36c3dc 100644
--- a/dev/Settings/User/Accounts.js
+++ b/dev/Settings/User/Accounts.js
@@ -160,4 +160,4 @@
module.exports = AccountsUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/ChangePassword.js b/dev/Settings/User/ChangePassword.js
index e132a6b63..5139db937 100644
--- a/dev/Settings/User/ChangePassword.js
+++ b/dev/Settings/User/ChangePassword.js
@@ -121,4 +121,4 @@
module.exports = ChangePasswordUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Contacts.js b/dev/Settings/User/Contacts.js
index a20d76156..298e5cdba 100644
--- a/dev/Settings/User/Contacts.js
+++ b/dev/Settings/User/Contacts.js
@@ -55,4 +55,4 @@
module.exports = ContactsUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Filters.js b/dev/Settings/User/Filters.js
index 9ed24f23a..dbbac5d46 100644
--- a/dev/Settings/User/Filters.js
+++ b/dev/Settings/User/Filters.js
@@ -188,7 +188,7 @@
oNew.generateID();
require('Knoin/Knoin').showScreenPopup(
- require('View/Popup/Filter'), [oNew, function () {
+ require('View/Popup/Filter'), [oNew, function () {
self.filters.push(oNew);
self.filterRaw.active(false);
}, false]);
@@ -202,7 +202,7 @@
;
require('Knoin/Knoin').showScreenPopup(
- require('View/Popup/Filter'), [oCloned, function () {
+ require('View/Popup/Filter'), [oCloned, function () {
var
aFilters = self.filters(),
@@ -243,4 +243,4 @@
module.exports = FiltersUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Folders.js b/dev/Settings/User/Folders.js
index 4d67f52a9..0b48d135f 100644
--- a/dev/Settings/User/Folders.js
+++ b/dev/Settings/User/Folders.js
@@ -200,4 +200,4 @@
module.exports = FoldersUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/General.js b/dev/Settings/User/General.js
index c6ce30d43..b428210d8 100644
--- a/dev/Settings/User/General.js
+++ b/dev/Settings/User/General.js
@@ -229,4 +229,4 @@
module.exports = GeneralUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/OpenPgp.js b/dev/Settings/User/OpenPgp.js
index eba41502c..18efd3d8e 100644
--- a/dev/Settings/User/OpenPgp.js
+++ b/dev/Settings/User/OpenPgp.js
@@ -80,4 +80,4 @@
module.exports = OpenPgpUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Security.js b/dev/Settings/User/Security.js
index 68f3e9aef..341bb040d 100644
--- a/dev/Settings/User/Security.js
+++ b/dev/Settings/User/Security.js
@@ -73,4 +73,4 @@
module.exports = SecurityUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Social.js b/dev/Settings/User/Social.js
index b1415239f..a600c2bba 100644
--- a/dev/Settings/User/Social.js
+++ b/dev/Settings/User/Social.js
@@ -77,4 +77,4 @@
module.exports = SocialUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Templates.js b/dev/Settings/User/Templates.js
index de256197b..c06d98aaa 100644
--- a/dev/Settings/User/Templates.js
+++ b/dev/Settings/User/Templates.js
@@ -104,4 +104,4 @@
module.exports = TemplatesUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Settings/User/Themes.js b/dev/Settings/User/Themes.js
index cbdeee8c6..4ccbf45e6 100644
--- a/dev/Settings/User/Themes.js
+++ b/dev/Settings/User/Themes.js
@@ -18,7 +18,7 @@
ThemeStore = require('Stores/Theme'),
Settings = require('Storage/Settings'),
-
+
Remote = require('Remote/User/Ajax')
;
@@ -182,4 +182,4 @@
module.exports = ThemesUserSettings;
-}());
\ No newline at end of file
+}());
diff --git a/dev/Stores/User/Contact.js b/dev/Stores/User/Contact.js
index 7af3fd388..20f57f75f 100644
--- a/dev/Stores/User/Contact.js
+++ b/dev/Stores/User/Contact.js
@@ -40,4 +40,4 @@
module.exports = new ContactUserStore();
-}());
\ No newline at end of file
+}());
diff --git a/dev/Stores/User/Filter.js b/dev/Stores/User/Filter.js
index c2a8d7a3b..c63153d89 100644
--- a/dev/Stores/User/Filter.js
+++ b/dev/Stores/User/Filter.js
@@ -17,8 +17,8 @@
this.filters = ko.observableArray([]);
- this.filters.loading = ko.observable(false).extend({'throttle': 200});
- this.filters.saving = ko.observable(false).extend({'throttle': 200});
+ this.filters.loading = ko.observable(false).extend({throttle: 200});
+ this.filters.saving = ko.observable(false).extend({throttle: 200});
this.raw = ko.observable('');
}
diff --git a/dev/Stores/User/Message.js b/dev/Stores/User/Message.js
index 021efcb53..1ac2d846b 100644
--- a/dev/Stores/User/Message.js
+++ b/dev/Stores/User/Message.js
@@ -187,7 +187,7 @@
if (oMessage)
{
- if (Enums.Layout.NoPreview === SettingsStore.layout())
+ if (Enums.Layout.NoPreview === SettingsStore.layout())
{
AppStore.focusedState(Enums.Focused.MessageView);
}
@@ -337,13 +337,13 @@
oToFolder = '' === sToFolderFullNameRaw ? null : Cache.getFolderFromCacheList(sToFolderFullNameRaw || ''),
sCurrentFolderFullNameRaw = FolderStore.currentFolderFullNameRaw(),
oCurrentMessage = this.message(),
- aMessages = sCurrentFolderFullNameRaw === sFromFolderFullNameRaw ? _.filter(aMessageList, function (oMessage) {
- return oMessage && -1 < Utils.inArray(Utils.pInt(oMessage.uid), aUidForRemove);
+ aMessages = sCurrentFolderFullNameRaw === sFromFolderFullNameRaw ? _.filter(aMessageList, function (item) {
+ return item && -1 < Utils.inArray(Utils.pInt(item.uid), aUidForRemove);
}) : []
;
- _.each(aMessages, function (oMessage) {
- if (oMessage && oMessage.unseen())
+ _.each(aMessages, function (item) {
+ if (item && item.unseen())
{
iUnseenCount++;
}
@@ -381,27 +381,27 @@
{
if (bCopy)
{
- _.each(aMessages, function (oMessage) {
- oMessage.checked(false);
+ _.each(aMessages, function (item) {
+ item.checked(false);
});
}
else
{
this.messageListIsNotCompleted(true);
- _.each(aMessages, function (oMessage) {
- if (oCurrentMessage && oCurrentMessage.hash === oMessage.hash)
+ _.each(aMessages, function (item) {
+ if (oCurrentMessage && oCurrentMessage.hash === item.hash)
{
oCurrentMessage = null;
self.message(null);
}
- oMessage.deleted(true);
+ item.deleted(true);
});
_.delay(function () {
- _.each(aMessages, function (oMessage) {
- self.messageList.remove(oMessage);
+ _.each(aMessages, function (item) {
+ self.messageList.remove(item);
});
}, 400);
}
@@ -421,12 +421,12 @@
{
aMessageList = this.messageList();
- if (aMessageList && 0 < aMessageList.length && !!_.find(aMessageList, function (oMessage) {
- return !!(oMessage && oMessage.deleted() && oMessage.uid === self.messageListThreadUid());
+ if (aMessageList && 0 < aMessageList.length && !!_.find(aMessageList, function (item) {
+ return !!(item && item.deleted() && item.uid === self.messageListThreadUid());
}))
{
- oMessage = _.find(aMessageList, function (oMessage) {
- return oMessage && !oMessage.deleted();
+ oMessage = _.find(aMessageList, function (item) {
+ return item && !item.deleted();
});
if (oMessage && this.messageListThreadUid() !== Utils.pString(oMessage.uid))
diff --git a/dev/Stores/User/Pgp.js b/dev/Stores/User/Pgp.js
index c0d52dbff..17b1c2ea0 100644
--- a/dev/Stores/User/Pgp.js
+++ b/dev/Stores/User/Pgp.js
@@ -43,7 +43,7 @@
return !!this.openpgp;
};
- PgpUserStore.prototype.findKeyByHex = function (aKeys,sHash)
+ PgpUserStore.prototype.findKeyByHex = function (aKeys, sHash)
{
return _.find(aKeys, function (oItem) {
return sHash && oItem && (sHash === oItem.id || -1 < oItem.ids.indexOf(sHash));
@@ -197,7 +197,7 @@
if (oDecryptedKey)
{
- oMessage.decrypt(oDecryptedKey).then(function(oDecryptedMessage){
+ oMessage.decrypt(oDecryptedKey).then(function(oDecryptedMessage) {
var oPrivateKey = null;
if (oDecryptedMessage)
{
diff --git a/dev/View/Admin/Login.js b/dev/View/Admin/Login.js
index 3a20a3c07..dbfc36329 100644
--- a/dev/View/Admin/Login.js
+++ b/dev/View/Admin/Login.js
@@ -145,4 +145,4 @@
module.exports = LoginAdminView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Admin/Settings/Pane.js b/dev/View/Admin/Settings/Pane.js
index d70471eeb..d2961f396 100644
--- a/dev/View/Admin/Settings/Pane.js
+++ b/dev/View/Admin/Settings/Pane.js
@@ -57,4 +57,4 @@
module.exports = PaneSettingsAdminView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Account.js b/dev/View/Popup/Account.js
index 13fadd4ae..9d7be7b79 100644
--- a/dev/View/Popup/Account.js
+++ b/dev/View/Popup/Account.js
@@ -132,4 +132,4 @@
module.exports = AccountPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Activate.js b/dev/View/Popup/Activate.js
index 8087ad5c3..555f0c96c 100644
--- a/dev/View/Popup/Activate.js
+++ b/dev/View/Popup/Activate.js
@@ -148,4 +148,4 @@
module.exports = ActivatePopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/AddOpenPgpKey.js b/dev/View/Popup/AddOpenPgpKey.js
index c274d304f..3848b9d75 100644
--- a/dev/View/Popup/AddOpenPgpKey.js
+++ b/dev/View/Popup/AddOpenPgpKey.js
@@ -34,51 +34,52 @@
this.addOpenPgpKeyCommand = Utils.createCommand(this, function () {
var
- iCount = 30,
- aMatch = null,
- sKey = Utils.trim(this.key()),
- oReg = /[\-]{3,6}BEGIN[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}[\s\S]+?[\-]{3,6}END[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}/gi,
- oOpenpgpKeyring = PgpStore.openpgpKeyring
+ count = 30,
+ match = null,
+ key = Utils.trim(this.key()),
+ reg = /[\-]{3,6}BEGIN[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}[\s\S]+?[\-]{3,6}END[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}/gi,
+ openpgpKeyring = PgpStore.openpgpKeyring,
+ done = false
;
- if (/[\n]/.test(sKey))
+ if (/[\n]/.test(key))
{
- sKey = sKey.replace(/[\r]+/g, '')
- .replace(/[\n]{2,}/g, '\n\n');
+ key = key.replace(/[\r]+/g, '').replace(/[\n]{2,}/g, '\n\n');
}
- this.key.error('' === sKey);
+ this.key.error('' === key);
- if (!oOpenpgpKeyring || this.key.error())
+ if (!openpgpKeyring || this.key.error())
{
return false;
}
do
{
- aMatch = oReg.exec(sKey);
- if (!aMatch || 0 > iCount)
+ match = reg.exec(key);
+ if (match && 0 > count)
{
- break;
+ if (match[0] && match[1] && match[2] && match[1] === match[2])
+ {
+ if ('PRIVATE' === match[1])
+ {
+ openpgpKeyring.privateKeys.importKey(match[0]);
+ }
+ else if ('PUBLIC' === match[1])
+ {
+ openpgpKeyring.publicKeys.importKey(match[0]);
+ }
+ }
+
+ count--;
}
- if (aMatch[0] && aMatch[1] && aMatch[2] && aMatch[1] === aMatch[2])
- {
- if ('PRIVATE' === aMatch[1])
- {
- oOpenpgpKeyring.privateKeys.importKey(aMatch[0]);
- }
- else if ('PUBLIC' === aMatch[1])
- {
- oOpenpgpKeyring.publicKeys.importKey(aMatch[0]);
- }
- }
+ done = true;
- iCount--;
}
- while (true);
+ while (done);
- oOpenpgpKeyring.store();
+ openpgpKeyring.store();
require('App/User').default.reloadOpenPgpKeys();
Utils.delegateRun(this, 'cancelCommand');
@@ -110,4 +111,4 @@
module.exports = AddOpenPgpKeyPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/AdvancedSearch.js b/dev/View/Popup/AdvancedSearch.js
index 1121d13d5..557b2ede1 100644
--- a/dev/View/Popup/AdvancedSearch.js
+++ b/dev/View/Popup/AdvancedSearch.js
@@ -73,7 +73,7 @@
parts = (search || '').split(/[\s]+/g)
;
- _.each(parts, function(part){
+ _.each(parts, function(part) {
switch (part)
{
case 'has:attachment':
@@ -192,4 +192,4 @@
module.exports = AdvancedSearchPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Ask.js b/dev/View/Popup/Ask.js
index 3d1cb4754..f7dc57b8e 100644
--- a/dev/View/Popup/Ask.js
+++ b/dev/View/Popup/Ask.js
@@ -136,4 +136,4 @@
module.exports = AskPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js
index 8c3629159..3115a78c8 100644
--- a/dev/View/Popup/Compose.js
+++ b/dev/View/Popup/Compose.js
@@ -1,6 +1,4 @@
-/* global require, module */
-
(function () {
'use strict';
@@ -54,12 +52,12 @@
var
self = this,
- fEmailOutInHelper = function (self, oIdentity, sName, bIn) {
- if (oIdentity && self && oIdentity[sName]() && (bIn ? true : self[sName]()))
+ fEmailOutInHelper = function (context, oIdentity, sName, bIn) {
+ if (oIdentity && context && oIdentity[sName]() && (bIn ? true : context[sName]()))
{
var
sIdentityEmail = oIdentity[sName](),
- aList = Utils.trim(self[sName]()).split(/[,]/)
+ aList = Utils.trim(context[sName]()).split(/[,]/)
;
aList = _.filter(aList, function (sEmail) {
@@ -72,7 +70,7 @@
aList.push(sIdentityEmail);
}
- self[sName](aList.join(','));
+ context[sName](aList.join(','));
}
}
;
@@ -323,7 +321,7 @@
this.resizer = ko.observable(false).extend({'throttle': 50});
this.resizer.subscribe(_.bind(function () {
- if (this.oEditor){
+ if (this.oEditor) {
this.oEditor.resize();
}
}, this));
@@ -335,7 +333,6 @@
this.deleteCommand = Utils.createCommand(this, function () {
var
- self = this,
PopupsAskViewModel = require('View/Popup/Ask')
;
@@ -524,9 +521,6 @@
if (this.allowContacts)
{
this.skipCommand();
-
- var self = this;
-
_.delay(function () {
kn.showScreenPopup(require('View/Popup/Contacts'),
[true, self.sLastFocusedField]);
@@ -558,11 +552,10 @@
if (window.Dropbox)
{
window.Dropbox.choose({
- 'success': function(aFiles) {
-
- if (aFiles && aFiles[0] && aFiles[0]['link'])
+ 'success': function(files) {
+ if (files && files[0] && files[0].link)
{
- self.addDropboxAttachment(aFiles[0]);
+ self.addDropboxAttachment(files[0]);
}
},
'linkType': 'direct',
@@ -847,14 +840,14 @@
var self = this;
if (!this.oEditor && this.composeEditorArea())
{
-//_.delay(function () {
+// _.delay(function () {
self.oEditor = new HtmlEditor(self.composeEditorArea(), null, function () {
fOnInit(self.oEditor);
self.resizerTrigger();
}, function (bHtml) {
self.isHtml(!!bHtml);
});
-//}, 1000);
+// }, 1000);
}
else if (this.oEditor)
{
@@ -932,7 +925,7 @@
sSignature = sSignature.replace(/{{MOMENT:[^}]+}}/g, '');
}
- catch(e) {}
+ catch (e) {/* eslint-disable-line no-empty */}
}
return sSignature;
@@ -1288,8 +1281,8 @@
}
else if (Utils.isNonEmptyArray(oMessageOrArray))
{
- _.each(oMessageOrArray, function (oMessage) {
- self.addMessageAsAttachment(oMessage);
+ _.each(oMessageOrArray, function (oItem) {
+ self.addMessageAsAttachment(oItem);
});
this.editor(function (oEditor) {
@@ -1452,7 +1445,7 @@
});
}
- if (!!Settings.appSettingsGet('allowCtrlEnterOnCompose'))
+ if (Settings.appSettingsGet('allowCtrlEnterOnCompose'))
{
key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () {
self.sendCommand();
@@ -1504,61 +1497,64 @@
if (oData && window.XMLHttpRequest && window.google &&
oData[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED &&
oData[window.google.picker.Response.DOCUMENTS] && oData[window.google.picker.Response.DOCUMENTS][0] &&
- oData[window.google.picker.Response.DOCUMENTS][0]['id'])
+ oData[window.google.picker.Response.DOCUMENTS][0].id)
{
var
self = this,
oRequest = new window.XMLHttpRequest()
;
- oRequest.open('GET', 'https://www.googleapis.com/drive/v2/files/' + oData[window.google.picker.Response.DOCUMENTS][0]['id']);
+ oRequest.open('GET', 'https://www.googleapis.com/drive/v2/files/' + oData[window.google.picker.Response.DOCUMENTS][0].id);
oRequest.setRequestHeader('Authorization', 'Bearer ' + sAccessToken);
oRequest.addEventListener('load', function() {
if (oRequest && oRequest.responseText)
{
- var oItem = JSON.parse(oRequest.responseText), fExport = function (oItem, sMimeType, sExt) {
- if (oItem && oItem['exportLinks'])
- {
- if (oItem['exportLinks'][sMimeType])
+ var
+ oResponse = JSON.parse(oRequest.responseText),
+ fExport = function (oItem, sMimeType, sExt) {
+ if (oItem && oItem.exportLinks)
{
- oItem['downloadUrl'] = oItem['exportLinks'][sMimeType];
- oItem['title'] = oItem['title'] + '.' + sExt;
- oItem['mimeType'] = sMimeType;
- }
- else if (oItem['exportLinks']['application/pdf'])
- {
- oItem['downloadUrl'] = oItem['exportLinks']['application/pdf'];
- oItem['title'] = oItem['title'] + '.pdf';
- oItem['mimeType'] = 'application/pdf';
+ if (oItem.exportLinks[sMimeType])
+ {
+ oResponse.downloadUrl = oItem.exportLinks[sMimeType];
+ oResponse.title = oItem.title + '.' + sExt;
+ oResponse.mimeType = sMimeType;
+ }
+ else if (oItem.exportLinks['application/pdf'])
+ {
+ oResponse.downloadUrl = oItem.exportLinks['application/pdf'];
+ oResponse.title = oItem.title + '.pdf';
+ oResponse.mimeType = 'application/pdf';
+ }
}
}
- };
+ ;
- if (oItem && !oItem['downloadUrl'] && oItem['mimeType'] && oItem['exportLinks'])
+ if (oResponse && !oResponse.downloadUrl && oResponse.mimeType && oResponse.exportLinks)
{
- switch (oItem['mimeType'].toString().toLowerCase())
+ switch (oResponse.mimeType.toString().toLowerCase())
{
case 'application/vnd.google-apps.document':
- fExport(oItem, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx');
+ fExport(oResponse, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx');
break;
case 'application/vnd.google-apps.spreadsheet':
- fExport(oItem, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx');
+ fExport(oResponse, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx');
break;
case 'application/vnd.google-apps.drawing':
- fExport(oItem, 'image/png', 'png');
+ fExport(oResponse, 'image/png', 'png');
break;
case 'application/vnd.google-apps.presentation':
- fExport(oItem, 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx');
+ fExport(oResponse, 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx');
break;
default:
- fExport(oItem, 'application/pdf', 'pdf');
+ fExport(oResponse, 'application/pdf', 'pdf');
break;
}
}
- if (oItem && oItem['downloadUrl'])
+ if (oResponse && oResponse.downloadUrl)
{
- self.addDriveAttachment(oItem, sAccessToken);
+ self.addDriveAttachment(oResponse, sAccessToken);
}
}
});
@@ -1607,10 +1603,10 @@
fResult = function (oAuthResult) {
if (oAuthResult && !oAuthResult.error)
{
- var oAuthToken = window.gapi.auth.getToken();
- if (oAuthToken)
+ var oToken = window.gapi.auth.getToken();
+ if (oToken)
{
- self.driveCreatePiker(oAuthToken);
+ self.driveCreatePiker(oToken);
}
return true;
@@ -1674,14 +1670,14 @@
var self = this;
return function () {
- var oItem = _.find(self.attachments(), function (oItem) {
+ var attachment = _.find(self.attachments(), function (oItem) {
return oItem && oItem.id === sId;
});
- if (oItem)
+ if (attachment)
{
- self.attachments.remove(oItem);
- Utils.delegateRunOnDestroy(oItem);
+ self.attachments.remove(attachment);
+ Utils.delegateRunOnDestroy(attachment);
if (oJua)
{
@@ -1925,15 +1921,15 @@
var
oAttachment = null,
iAttachmentSizeLimit = Utils.pInt(Settings.settingsGet('AttachmentLimit')),
- mSize = oDropboxFile['bytes']
+ mSize = oDropboxFile.bytes
;
oAttachment = new ComposeAttachmentModel(
- oDropboxFile['link'], oDropboxFile['name'], mSize
+ oDropboxFile.link, oDropboxFile.name, mSize
);
oAttachment.fromMessage = false;
- oAttachment.cancel = this.cancelAttachmentHelper(oDropboxFile['link']);
+ oAttachment.cancel = this.cancelAttachmentHelper(oDropboxFile.link);
oAttachment.waiting(false).uploading(true).complete(false);
this.attachments.push(oAttachment);
@@ -1966,7 +1962,7 @@
oAttachment.error(Translator.getUploadErrorDescByCode(Enums.UploadErrorCode.FileNoUploaded));
}
- }, [oDropboxFile['link']]);
+ }, [oDropboxFile.link]);
return true;
};
@@ -1981,15 +1977,15 @@
var
iAttachmentSizeLimit = Utils.pInt(Settings.settingsGet('AttachmentLimit')),
oAttachment = null,
- mSize = oDriveFile['fileSize'] ? Utils.pInt(oDriveFile['fileSize']) : 0
+ mSize = oDriveFile.fileSize ? Utils.pInt(oDriveFile.fileSize) : 0
;
oAttachment = new ComposeAttachmentModel(
- oDriveFile['downloadUrl'], oDriveFile['title'], mSize
+ oDriveFile.downloadUrl, oDriveFile.title, mSize
);
oAttachment.fromMessage = false;
- oAttachment.cancel = this.cancelAttachmentHelper(oDriveFile['downloadUrl']);
+ oAttachment.cancel = this.cancelAttachmentHelper(oDriveFile.downloadUrl);
oAttachment.waiting(false).uploading(true).complete(false);
this.attachments.push(oAttachment);
@@ -2023,7 +2019,7 @@
oAttachment.error(Translator.getUploadErrorDescByCode(Enums.UploadErrorCode.FileNoUploaded));
}
- }, oDriveFile['downloadUrl'], sAccessToken);
+ }, oDriveFile.downloadUrl, sAccessToken);
return true;
};
@@ -2089,14 +2085,14 @@
ComposePopupView.prototype.removeLinkedAttachments = function ()
{
- var oItem = _.find(this.attachments(), function (oItem) {
+ var arrachment = _.find(this.attachments(), function (oItem) {
return oItem && oItem.isLinked;
});
- if (oItem)
+ if (arrachment)
{
- this.attachments.remove(oItem);
- Utils.delegateRunOnDestroy(oItem);
+ this.attachments.remove(arrachment);
+ Utils.delegateRunOnDestroy(arrachment);
}
};
diff --git a/dev/View/Popup/ComposeOpenPgp.js b/dev/View/Popup/ComposeOpenPgp.js
index c59fb0e2f..1d565caee 100644
--- a/dev/View/Popup/ComposeOpenPgp.js
+++ b/dev/View/Popup/ComposeOpenPgp.js
@@ -223,7 +223,7 @@
self.resultCallback(mData.data);
self.cancelCommand();
- })['catch'](function (e) {
+ }).then(null, function (e) {
self.notification(Translator.i18n('PGP_NOTIFICATIONS/PGP_ERROR', {
'ERROR': '' + e
}));
@@ -302,13 +302,9 @@
});
this.updateCommand = Utils.createCommand(this, function () {
-
- var self = this;
-
_.each(this.encryptKeys(), function (oKey) {
oKey.removable(!self.sign() || !self.signKey() || self.signKey().key.id !== oKey.key.id);
});
-
});
this.selectedPrivateKey.subscribe(function (sValue) {
@@ -334,9 +330,9 @@
self.defautOptionsAfterRender(oDomOption, oItem);
- if (oItem && !Utils.isUnd(oItem['class']) && oDomOption)
+ if (oItem && !Utils.isUnd(oItem.class) && oDomOption)
{
- $(oDomOption).addClass(oItem['class']);
+ $(oDomOption).addClass(oItem.class);
}
};
@@ -465,14 +461,14 @@
if (aRec && 0 < aRec.length)
{
- this.encryptKeys(_.uniq(_.compact(_.flatten(_.map(aRec, function (sEmail) {
- var aKeys = PgpStore.findAllPublicKeysByEmailNotNative(sEmail);
- return aKeys ? _.map(aKeys, function (oKey) {
+ this.encryptKeys(_.uniq(_.compact(_.flatten(_.map(aRec, function (sRecEmail) {
+ var keys = PgpStore.findAllPublicKeysByEmailNotNative(sRecEmail);
+ return keys ? _.map(keys, function (oKey) {
return {
'empty': !oKey,
'selected': ko.observable(!!oKey),
'removable': ko.observable(!self.sign() || !self.signKey() || self.signKey().key.id !== oKey.id),
- 'users': oKey ? (oKey.users || [sEmail]) : [sEmail],
+ 'users': oKey ? (oKey.users || [sRecEmail]) : [sRecEmail],
'hash': oKey ? oKey.id.substr(-8).toUpperCase() : '',
'key': oKey
};
diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js
index 35968ec02..76ca03f33 100644
--- a/dev/View/Popup/Contacts.js
+++ b/dev/View/Popup/Contacts.js
@@ -210,7 +210,7 @@
});
}, this);
- this.selector = new Selector(this.contacts, this.currentContact, null,
+ this.selector = new Selector.Selector(this.contacts, this.currentContact, null,
'.e-contact-item .actionHandle', '.e-contact-item.selected', '.e-contact-item .checkboxItem',
'.e-contact-item.focused');
@@ -370,7 +370,6 @@
this.syncCommand = Utils.createCommand(this, function () {
- var self = this;
require('App/User').default.contactsSync(function (sResult, oData) {
if (Enums.StorageResultType.Success !== sResult || !oData || !oData.Result)
{
@@ -439,8 +438,8 @@
ContactsPopupView.prototype.addNewOrFocusProperty = function (sType, sTypeStr)
{
- var oItem = _.find(this.viewProperties(), function (oItem) {
- return sType === oItem.type();
+ var oItem = _.find(this.viewProperties(), function (oProp) {
+ return sType === oProp.type();
});
if (oItem)
@@ -794,4 +793,4 @@
module.exports = ContactsPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Domain.js b/dev/View/Popup/Domain.js
index d5383d59c..184cef5d3 100644
--- a/dev/View/Popup/Domain.js
+++ b/dev/View/Popup/Domain.js
@@ -492,4 +492,4 @@
module.exports = DomainPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/DomainAlias.js b/dev/View/Popup/DomainAlias.js
index 083c61b70..ecfdd6dc0 100644
--- a/dev/View/Popup/DomainAlias.js
+++ b/dev/View/Popup/DomainAlias.js
@@ -114,4 +114,4 @@
module.exports = DomainAliasPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Filter.js b/dev/View/Popup/Filter.js
index ef409d5d4..e4a397f25 100644
--- a/dev/View/Popup/Filter.js
+++ b/dev/View/Popup/Filter.js
@@ -207,4 +207,4 @@
module.exports = FilterPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/FolderCreate.js b/dev/View/Popup/FolderCreate.js
index 19c436f20..54f21c922 100644
--- a/dev/View/Popup/FolderCreate.js
+++ b/dev/View/Popup/FolderCreate.js
@@ -117,4 +117,4 @@
module.exports = FolderCreateView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/FolderSystem.js b/dev/View/Popup/FolderSystem.js
index 83d3d046b..ae3d53f04 100644
--- a/dev/View/Popup/FolderSystem.js
+++ b/dev/View/Popup/FolderSystem.js
@@ -134,4 +134,4 @@
module.exports = FolderSystemPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Identity.js b/dev/View/Popup/Identity.js
index 08b495e69..61f78848c 100644
--- a/dev/View/Popup/Identity.js
+++ b/dev/View/Popup/Identity.js
@@ -201,4 +201,4 @@
module.exports = IdentityPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/KeyboardShortcutsHelp.js b/dev/View/Popup/KeyboardShortcutsHelp.js
index 5712c0d65..044d705c9 100644
--- a/dev/View/Popup/KeyboardShortcutsHelp.js
+++ b/dev/View/Popup/KeyboardShortcutsHelp.js
@@ -61,4 +61,4 @@
module.exports = KeyboardShortcutsHelpPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Languages.js b/dev/View/Popup/Languages.js
index 870d8850e..d4eba7320 100644
--- a/dev/View/Popup/Languages.js
+++ b/dev/View/Popup/Languages.js
@@ -58,9 +58,9 @@
LanguagesPopupView.prototype.setLanguageSelection = function ()
{
- var sCurrent = this.fLang ? ko.unwrap(this.fLang) : '';
- _.each(this.languages(), function (oItem) {
- oItem['selected'](oItem['key'] === sCurrent);
+ var currentLang = this.fLang ? ko.unwrap(this.fLang) : '';
+ _.each(this.languages(), function (item) {
+ item.selected(item.key === currentLang);
});
};
@@ -92,4 +92,4 @@
module.exports = LanguagesPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/NewOpenPgpKey.js b/dev/View/Popup/NewOpenPgpKey.js
index aacf12f34..29cf95eea 100644
--- a/dev/View/Popup/NewOpenPgpKey.js
+++ b/dev/View/Popup/NewOpenPgpKey.js
@@ -51,10 +51,10 @@
return false;
}
- oUserId['email'] = this.email();
+ oUserId.email = this.email();
if ('' !== this.name())
{
- oUserId['name'] = this.name();
+ oUserId.name = this.name();
}
this.submitRequest(true);
@@ -66,9 +66,9 @@
try {
mPromise = PgpStore.openpgp.generateKey({
- 'userIds': [oUserId],
- 'numBits': Utils.pInt(self.keyBitLength()),
- 'passphrase': Utils.trim(self.password())
+ userIds: [oUserId],
+ numBits: Utils.pInt(self.keyBitLength()),
+ passphrase: Utils.trim(self.password())
});
mPromise.then(function (mKeyPair) {
@@ -86,7 +86,7 @@
Utils.delegateRun(self, 'cancelCommand');
}
- })['catch'](function() {
+ }).then(null, function() {
self.submitRequest(false);
});
}
@@ -129,4 +129,4 @@
module.exports = NewOpenPgpKeyPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Plugin.js b/dev/View/Popup/Plugin.js
index 9ce7a40a4..9d1514930 100644
--- a/dev/View/Popup/Plugin.js
+++ b/dev/View/Popup/Plugin.js
@@ -60,24 +60,24 @@
this.saveCommand = Utils.createCommand(this, function () {
- var oList = {};
+ var list = {};
- oList['Name'] = this.name();
+ list.Name = this.name();
_.each(this.configures(), function (oItem) {
- var mValue = oItem.value();
- if (false === mValue || true === mValue)
+ var value = oItem.value();
+ if (false === value || true === value)
{
- mValue = mValue ? '1' : '0';
+ value = value ? '1' : '0';
}
- oList['_' + oItem['Name']] = mValue;
+ list['_' + oItem.Name] = value;
}, this);
this.saveError('');
- Remote.pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
+ Remote.pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, list);
}, this.hasConfiguration);
@@ -120,10 +120,10 @@
if (oPlugin)
{
- this.name(oPlugin['Name']);
- this.readme(oPlugin['Readme']);
+ this.name(oPlugin.Name);
+ this.readme(oPlugin.Readme);
- var aConfig = oPlugin['Config'];
+ var aConfig = oPlugin.Config;
if (Utils.isNonEmptyArray(aConfig))
{
this.configures(_.map(aConfig, function (aItem) {
@@ -172,4 +172,4 @@
module.exports = PluginPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/Template.js b/dev/View/Popup/Template.js
index e27b24580..8962af619 100644
--- a/dev/View/Popup/Template.js
+++ b/dev/View/Popup/Template.js
@@ -170,9 +170,9 @@
self.body.loading(false);
if (Enums.StorageResultType.Success === sResult && oData && oData.Result &&
- 'Object/Template' === oData.Result['@Object'] && Utils.isNormal(oData.Result['Body']))
+ 'Object/Template' === oData.Result['@Object'] && Utils.isNormal(oData.Result.Body))
{
- oTemplate.body = oData.Result['Body'];
+ oTemplate.body = oData.Result.Body;
oTemplate.populated = true;
self.body(oTemplate.body);
@@ -202,4 +202,4 @@
module.exports = TemplatePopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/TwoFactorConfiguration.js b/dev/View/Popup/TwoFactorConfiguration.js
index 6910482ff..5d2485244 100644
--- a/dev/View/Popup/TwoFactorConfiguration.js
+++ b/dev/View/Popup/TwoFactorConfiguration.js
@@ -246,4 +246,4 @@
module.exports = TwoFactorConfigurationPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/TwoFactorTest.js b/dev/View/Popup/TwoFactorTest.js
index 465f2fe9a..71c21218e 100644
--- a/dev/View/Popup/TwoFactorTest.js
+++ b/dev/View/Popup/TwoFactorTest.js
@@ -88,4 +88,4 @@
module.exports = TwoFactorTestPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/ViewOpenPgpKey.js b/dev/View/Popup/ViewOpenPgpKey.js
index b2e4193b4..5824d7afa 100644
--- a/dev/View/Popup/ViewOpenPgpKey.js
+++ b/dev/View/Popup/ViewOpenPgpKey.js
@@ -68,4 +68,4 @@
module.exports = ViewOpenPgpKeyPopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/Popup/WelcomePage.js b/dev/View/Popup/WelcomePage.js
index 3dd18a686..6a5fe2700 100644
--- a/dev/View/Popup/WelcomePage.js
+++ b/dev/View/Popup/WelcomePage.js
@@ -59,4 +59,4 @@
module.exports = WelcomePagePopupView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/About.js b/dev/View/User/About.js
index 0bb2d27f0..56d830eb6 100644
--- a/dev/View/User/About.js
+++ b/dev/View/User/About.js
@@ -31,4 +31,4 @@
module.exports = AboutUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/AbstractSystemDropDown.js b/dev/View/User/AbstractSystemDropDown.js
index 58f6ccfda..5e709519a 100644
--- a/dev/View/User/AbstractSystemDropDown.js
+++ b/dev/View/User/AbstractSystemDropDown.js
@@ -141,4 +141,4 @@
module.exports = AbstractSystemDropDownUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/Login.js b/dev/View/User/Login.js
index 935619e98..8e64182b7 100644
--- a/dev/View/User/Login.js
+++ b/dev/View/User/Login.js
@@ -201,7 +201,7 @@
self = this,
sPassword = this.password(),
- fLoginRequest = _.bind(function (sPassword) {
+ fLoginRequest = _.bind(function (sLoginPassword) {
Remote.login(_.bind(function (sResult, oData) {
@@ -215,7 +215,7 @@
this.additionalCode.visibility(true);
this.submitRequest(false);
- _.delay(function(){
+ _.delay(function() {
self.additionalCode.focused(true);
}, 100);
}
@@ -261,13 +261,13 @@
this.submitError(Translator.getNotification(Enums.Notification.UnknownError));
}
- }, this), this.email(), '', sPassword, !!this.signMe(),
+ }, this), this.email(), '', sLoginPassword, !!this.signMe(),
this.bSendLanguage ? this.language() : '',
this.additionalCode.visibility() ? this.additionalCode() : '',
this.additionalCode.visibility() ? !!this.additionalCodeSignMe() : false
);
- Local.set(Enums.ClientSideKeyName.LastSignMe, !!this.signMe() ? '-1-' : '-0-');
+ Local.set(Enums.ClientSideKeyName.LastSignMe, this.signMe() ? '-1-' : '-0-');
}, this)
;
@@ -517,4 +517,4 @@
module.exports = LoginUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js
index be42a9276..6010507c5 100644
--- a/dev/View/User/MailBox/MessageList.js
+++ b/dev/View/User/MailBox/MessageList.js
@@ -279,7 +279,7 @@
this.quotaTooltip = _.bind(this.quotaTooltip, this);
- this.selector = new Selector(this.messageList, this.selectorMessageSelected, this.selectorMessageFocused,
+ this.selector = new Selector.Selector(this.messageList, this.selectorMessageSelected, this.selectorMessageFocused,
'.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage',
'.messageListItem.focused');
@@ -510,26 +510,24 @@
var
oEl = Utils.draggablePlace(),
- aUids = MessageStore.messageListCheckedOrSelectedUidsWithSubMails()
+ updateUidsInfo = function() {
+ var aUids = MessageStore.messageListCheckedOrSelectedUidsWithSubMails();
+ oEl.data('rl-uids', aUids);
+ oEl.find('.text').text('' + aUids.length);
+ }
;
oEl.data('rl-folder', FolderStore.currentFolderFullNameRaw());
- oEl.data('rl-uids', aUids);
- oEl.find('.text').text('' + aUids.length);
- _.defer(function () {
- var aUids = MessageStore.messageListCheckedOrSelectedUidsWithSubMails();
-
- oEl.data('rl-uids', aUids);
- oEl.find('.text').text('' + aUids.length);
- });
+ updateUidsInfo();
+ _.defer(updateUidsInfo);
return oEl;
};
/**
* @param {string} sFolderFullNameRaw
- * @param {string|bool} sUid
+ * @param {string|bool} mUid
* @param {number} iSetAction
* @param {Array=} aMessages = null
*/
@@ -964,9 +962,8 @@
{
var
self = this,
- oMessage = _.find(this.messageList(), function (oMessage) {
- return oMessage &&
- !Cache.hasRequestedMessage(oMessage.folderFullNameRaw, oMessage.uid);
+ oMessage = _.find(this.messageList(), function (oItem) {
+ return oItem && !Cache.hasRequestedMessage(oItem.folderFullNameRaw, oItem.uid);
})
;
@@ -1027,17 +1024,17 @@
var
oJua = new Jua({
- 'action': Links.append(),
- 'name': 'AppendFile',
- 'queueSize': 1,
- 'multipleSizeLimit': 1,
- 'hidden': {
- 'Folder': function () {
+ action: Links.append(),
+ name: 'AppendFile',
+ queueSize: 1,
+ multipleSizeLimit: 1,
+ hidden: {
+ Folder: function () {
return FolderStore.currentFolderFullNameRaw();
}
},
- 'dragAndDropElement': this.dragOverArea(),
- 'dragAndDropBodyElement': this.dragOverBodyArea()
+ dragAndDropElement: this.dragOverArea(),
+ dragAndDropBodyElement: this.dragOverBodyArea()
})
;
@@ -1063,7 +1060,7 @@
}, this))
.on('onSelect', _.bind(function (sUid, oData) {
- if (sUid && oData && 'message/rfc822' === oData['Type'])
+ if (sUid && oData && 'message/rfc822' === oData.Type)
{
MessageStore.messageListLoading(true);
return true;
diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js
index 42d343297..fe91fd965 100644
--- a/dev/View/User/MailBox/MessageView.js
+++ b/dev/View/User/MailBox/MessageView.js
@@ -347,7 +347,7 @@
}, this);
this.messageActiveDom.subscribe(function (oDom) {
- this.bodyBackgroundColor(oDom ? this.detectDomBackgroundColor(oDom): '');
+ this.bodyBackgroundColor(oDom ? this.detectDomBackgroundColor(oDom) : '');
}, this);
this.message.subscribe(function (oMessage) {
@@ -469,22 +469,22 @@
iLimit = 5,
sResult = '',
aC = null,
- fFindDom = function (oDom) {
- var aC = oDom ? oDom.children() : null;
- return (aC && 1 === aC.length && aC.is('table,div,center')) ? aC : null;
+ fFindDom = function (oInputDom) {
+ var children = oInputDom ? oInputDom.children() : null;
+ return (children && 1 === children.length && children.is('table,div,center')) ? children : null;
},
- fFindColor = function (oDom) {
- var sResult = '';
- if (oDom)
+ fFindColor = function (oInputDom) {
+ var color = '';
+ if (oInputDom)
{
- sResult = oDom.css('background-color') || '';
- if (!oDom.is('table'))
+ color = oInputDom.css('background-color') || '';
+ if (!oInputDom.is('table'))
{
- sResult = 'rgba(0, 0, 0, 0)' === sResult || 'transparent' === sResult ? '' : sResult;
+ color = 'rgba(0, 0, 0, 0)' === color || 'transparent' === color ? '' : color;
}
}
- return sResult;
+ return color;
}
;
@@ -606,10 +606,10 @@
iListIndex++;
return {
- 'src': oItem.linkPreview(),
- 'thumb': oItem.linkThumbnail(),
- 'subHtml': oItem.fileName,
- 'downloadUrl': oItem.linkPreview()
+ src: oItem.linkPreview(),
+ thumb: oItem.linkThumbnail(),
+ subHtml: oItem.fileName,
+ downloadUrl: oItem.linkPreview()
};
}
@@ -707,7 +707,7 @@
oDom
.on('click', 'a', function (oEvent) {
// setup maito protocol
- return !(!!oEvent && 3 !== oEvent['which'] && Utils.mailToHelper($(this).attr('href'),
+ return !(!!oEvent && 3 !== oEvent.which && Utils.mailToHelper($(this).attr('href'),
Settings.capa(Enums.Capa.Composer) ? require('View/Popup/Compose') : null));
})
// .on('mouseover', 'a', _.debounce(function (oEvent) {
@@ -1221,4 +1221,4 @@
module.exports = MessageViewMailBoxUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/Settings/Menu.js b/dev/View/User/Settings/Menu.js
index d0f05efe4..16496d67c 100644
--- a/dev/View/User/Settings/Menu.js
+++ b/dev/View/User/Settings/Menu.js
@@ -99,4 +99,4 @@
module.exports = MenuSettingsUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/Settings/Pane.js b/dev/View/User/Settings/Pane.js
index 106d38c59..75e43f9d6 100644
--- a/dev/View/User/Settings/Pane.js
+++ b/dev/View/User/Settings/Pane.js
@@ -73,4 +73,4 @@
module.exports = PaneSettingsUserView;
-}());
\ No newline at end of file
+}());
diff --git a/dev/View/User/Settings/SystemDropDown.js b/dev/View/User/Settings/SystemDropDown.js
index d612c2688..d5a97e731 100644
--- a/dev/View/User/Settings/SystemDropDown.js
+++ b/dev/View/User/Settings/SystemDropDown.js
@@ -25,4 +25,4 @@
module.exports = SystemDropDownSettingsUserView;
-}());
\ No newline at end of file
+}());
diff --git a/gulpfile.js b/gulpfile.js
index bc73fbc30..00986479c 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -22,11 +22,6 @@ var
zipFile: '',
paths: {},
- summary: {
- verbose: true,
- reasonCol: 'cyan,bold',
- codeCol: 'green'
- },
uglify: {
mangle: true,
compress: true
@@ -100,6 +95,7 @@ function copyFile(sFile, sNewFile, callback)
cfg.paths.globjs = 'dev/**/*.{js,jsx,html,css}';
cfg.paths.globjsonly = 'dev/**/*.js';
cfg.paths.globjsxonly = 'dev/**/*.jsx';
+cfg.paths.globjsall = 'dev/**/*.{js,jsx}';
cfg.paths.globtsonly = 'dev/**/*.ts';
cfg.paths.static = 'rainloop/v/' + cfg.devVersion + '/static/';
cfg.paths.staticJS = 'rainloop/v/' + cfg.devVersion + '/static/js/';
@@ -417,38 +413,15 @@ gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
});
// lint
-gulp.task('js:lint', function() {
-
- var jshint = require('gulp-jshint');
-
- return gulp.src(cfg.paths.globjsonly)
- .pipe(jshint('.jshintrc'))
- .pipe(jshint.reporter('jshint-summary', cfg.summary))
- .pipe(jshint.reporter('fail'))
- ;
-});
-
gulp.task('js:eslint', function() {
-
var eslint = require('gulp-eslint');
-
- return gulp.src(cfg.paths.globjsxonly)
+ return gulp.src(cfg.paths.globjsall)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
-gulp.task('js:tslint', function() {
-
- var tslint = require('gulp-tslint'); // todo
-
- return gulp.src(cfg.paths.globtsonly)
- .pipe(tslint())
- .pipe(tslint.format())
- .pipe(tslint.failAfterError());
-});
-
-gulp.task('js:validate', ['js:lint', 'js:eslint'/*, 'js:tslint'*/]);
+gulp.task('js:validate', ['js:eslint']);
// OTHER
regOtherMinTask('other:cookie', 'vendors/jquery-cookie/', 'jquery.cookie.js', 'jquery.cookie-1.4.0.min.js',