mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
CommonJS (research/4)
This commit is contained in:
parent
06bb124379
commit
8d73c7b1b2
127 changed files with 1893 additions and 1085 deletions
|
|
@ -1,12 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
LinkBuilder = require('../Common/LinkBuilder.js')
|
||||
ko = require('../External/ko.js')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
@ -28,7 +26,7 @@
|
|||
*/
|
||||
AccountModel.prototype.changeAccountLink = function ()
|
||||
{
|
||||
return LinkBuilder.change(this.email);
|
||||
return require('../Common/LinkBuilder.js').change(this.email);
|
||||
};
|
||||
|
||||
module.exports = AccountModel;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
window = require('../External/window.js'),
|
||||
Globals = require('../Common/Globals.js'),
|
||||
Utils = require('../Common/Utils.js'),
|
||||
LinkBuilder = require('../Common/LinkBuilder.js')
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Utils = require('../Common/Utils.js')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('../External/underscore.js'),
|
||||
ko = require('../External/ko.js'),
|
||||
|
|
@ -11,7 +10,7 @@
|
|||
Utils = require('../Common/Utils.js'),
|
||||
LinkBuilder = require('../Common/LinkBuilder.js')
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Enums = require('../Common/Enums.js'),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Utils = require('../Common/Utils.js')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
Enums = require('../Common/Enums.js'),
|
||||
Utils = require('../Common/Utils.js')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Enums = require('../Common/Enums.js')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Enums = require('../Common/Enums.js'),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('../External/underscore.js'),
|
||||
ko = require('../External/ko.js'),
|
||||
|
|
@ -44,7 +43,7 @@
|
|||
this.actionBlink = ko.observable(false).extend({'falseTimeout': 1000});
|
||||
|
||||
this.nameForEdit = ko.observable('');
|
||||
|
||||
|
||||
this.privateMessageCountAll = ko.observable(0);
|
||||
this.privateMessageCountUnread = ko.observable(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../External/ko.js'),
|
||||
Utils = require('../Common/Utils.js')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
window = require('../External/window.js'),
|
||||
$ = require('../External/jquery.js'),
|
||||
|
|
@ -1081,6 +1080,7 @@
|
|||
|
||||
this.body.data('rl-plain-raw', this.plainRaw);
|
||||
|
||||
var Data = require('../Storages/WebMailDataStorage.js');
|
||||
if (Data.capaOpenPGP())
|
||||
{
|
||||
this.body.data('rl-plain-pgp-signed', !!this.isPgpSigned());
|
||||
|
|
@ -1093,37 +1093,39 @@
|
|||
|
||||
MessageModel.prototype.storePgpVerifyDataToDom = function ()
|
||||
{
|
||||
if (this.body && Data.capaOpenPGP())
|
||||
{
|
||||
this.body.data('rl-pgp-verify-status', this.pgpSignedVerifyStatus());
|
||||
this.body.data('rl-pgp-verify-user', this.pgpSignedVerifyUser());
|
||||
}
|
||||
var Data = require('../Storages/WebMailDataStorage.js');
|
||||
if (this.body && Data.capaOpenPGP())
|
||||
{
|
||||
this.body.data('rl-pgp-verify-status', this.pgpSignedVerifyStatus());
|
||||
this.body.data('rl-pgp-verify-user', this.pgpSignedVerifyUser());
|
||||
}
|
||||
};
|
||||
|
||||
MessageModel.prototype.fetchDataToDom = function ()
|
||||
{
|
||||
if (this.body)
|
||||
{
|
||||
this.isHtml(!!this.body.data('rl-is-html'));
|
||||
this.hasImages(!!this.body.data('rl-has-images'));
|
||||
if (this.body)
|
||||
{
|
||||
this.isHtml(!!this.body.data('rl-is-html'));
|
||||
this.hasImages(!!this.body.data('rl-has-images'));
|
||||
|
||||
this.plainRaw = Utils.pString(this.body.data('rl-plain-raw'));
|
||||
this.plainRaw = Utils.pString(this.body.data('rl-plain-raw'));
|
||||
|
||||
if (Data.capaOpenPGP())
|
||||
{
|
||||
this.isPgpSigned(!!this.body.data('rl-plain-pgp-signed'));
|
||||
this.isPgpEncrypted(!!this.body.data('rl-plain-pgp-encrypted'));
|
||||
this.pgpSignedVerifyStatus(this.body.data('rl-pgp-verify-status'));
|
||||
this.pgpSignedVerifyUser(this.body.data('rl-pgp-verify-user'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.isPgpSigned(false);
|
||||
this.isPgpEncrypted(false);
|
||||
this.pgpSignedVerifyStatus(Enums.SignedVerifyStatus.None);
|
||||
this.pgpSignedVerifyUser('');
|
||||
}
|
||||
}
|
||||
var Data = require('../Storages/WebMailDataStorage.js');
|
||||
if (Data.capaOpenPGP())
|
||||
{
|
||||
this.isPgpSigned(!!this.body.data('rl-plain-pgp-signed'));
|
||||
this.isPgpEncrypted(!!this.body.data('rl-plain-pgp-encrypted'));
|
||||
this.pgpSignedVerifyStatus(this.body.data('rl-pgp-verify-status'));
|
||||
this.pgpSignedVerifyUser(this.body.data('rl-pgp-verify-user'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.isPgpSigned(false);
|
||||
this.isPgpEncrypted(false);
|
||||
this.pgpSignedVerifyStatus(Enums.SignedVerifyStatus.None);
|
||||
this.pgpSignedVerifyUser('');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
MessageModel.prototype.verifyPgpSignedClearMessage = function ()
|
||||
|
|
@ -1133,6 +1135,7 @@
|
|||
var
|
||||
aRes = [],
|
||||
mPgpMessage = null,
|
||||
Data = require('../Storages/WebMailDataStorage.js'),
|
||||
sFrom = this.from && this.from[0] && this.from[0].email ? this.from[0].email : '',
|
||||
aPublicKeys = Data.findPublicKeysByEmail(sFrom),
|
||||
oValidKey = null,
|
||||
|
|
@ -1196,6 +1199,7 @@
|
|||
aRes = [],
|
||||
mPgpMessage = null,
|
||||
mPgpMessageDecrypted = null,
|
||||
Data = require('../Storages/WebMailDataStorage.js'),
|
||||
sFrom = this.from && this.from[0] && this.from[0].email ? this.from[0].email : '',
|
||||
aPublicKey = Data.findPublicKeysByEmail(sFrom),
|
||||
oPrivateKey = Data.findSelfPrivateKey(sPassword),
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
'use strict';
|
||||
|
||||
(function (module) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
ko = require('../Externalko.js')
|
||||
ko = require('../External/ko.js')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue