mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
OpenPGP - part 2 - unstable (#53)
This commit is contained in:
parent
d181974127
commit
0bb69d4494
23 changed files with 600 additions and 339 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
function AdminSecurity()
|
function AdminSecurity()
|
||||||
{
|
{
|
||||||
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
|
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
|
||||||
|
this.openPGP = ko.observable(!!RL.settingsGet('OpenPGP'));
|
||||||
|
|
||||||
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
||||||
this.adminPassword = ko.observable('');
|
this.adminPassword = ko.observable('');
|
||||||
|
|
@ -65,6 +66,12 @@ AdminSecurity.prototype.onBuild = function ()
|
||||||
'TokenProtection': bValue ? '1' : '0'
|
'TokenProtection': bValue ? '1' : '0'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.openPGP.subscribe(function (bValue) {
|
||||||
|
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||||
|
'OpenPGP': bValue ? '1' : '0'
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
AdminSecurity.prototype.onHide = function ()
|
AdminSecurity.prototype.onHide = function ()
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,7 @@ AbstractApp.prototype.sub = function (sName, fFunc, oContext)
|
||||||
*/
|
*/
|
||||||
AbstractApp.prototype.pub = function (sName, aArgs)
|
AbstractApp.prototype.pub = function (sName, aArgs)
|
||||||
{
|
{
|
||||||
|
Plugins.runHook('rl-pub', [sName, aArgs]);
|
||||||
if (!Utils.isUnd(this.oSubs[sName]))
|
if (!Utils.isUnd(this.oSubs[sName]))
|
||||||
{
|
{
|
||||||
_.each(this.oSubs[sName], function (aItem) {
|
_.each(this.oSubs[sName], function (aItem) {
|
||||||
|
|
|
||||||
|
|
@ -703,6 +703,7 @@ RainLoopApp.prototype.mailToHelper = function (sMailToUrl)
|
||||||
|
|
||||||
RainLoopApp.prototype.bootstart = function ()
|
RainLoopApp.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
RL.pub('rl.bootstart');
|
||||||
AbstractApp.prototype.bootstart.call(this);
|
AbstractApp.prototype.bootstart.call(this);
|
||||||
|
|
||||||
RL.data().populateDataOnStart();
|
RL.data().populateDataOnStart();
|
||||||
|
|
@ -785,17 +786,26 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
if (bValue)
|
if (bValue)
|
||||||
{
|
{
|
||||||
// if (window.crypto && window.crypto.getRandomValues)
|
if (window.crypto && window.crypto.getRandomValues && RL.settingsGet('OpenPGP'))
|
||||||
// {
|
{
|
||||||
// $.ajax({
|
$.ajax({
|
||||||
// 'url': RL.link().openPgpJs(),
|
'url': RL.link().openPgpJs(),
|
||||||
// 'dataType': 'script',
|
'dataType': 'script',
|
||||||
// 'cache': true,
|
'cache': true,
|
||||||
// 'success': function () {
|
'success': function () {
|
||||||
// window.console.log('openPgpJs');
|
if (window.openpgp)
|
||||||
// }
|
{
|
||||||
// });
|
// window.console.log(window.openpgp);
|
||||||
// }
|
Globals.bAllowOpenPGP = true;
|
||||||
|
RL.pub('openpgp.init');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Globals.bAllowOpenPGP = false;
|
||||||
|
}
|
||||||
|
|
||||||
kn.startScreens([MailBoxScreen, SettingsScreen]);
|
kn.startScreens([MailBoxScreen, SettingsScreen]);
|
||||||
|
|
||||||
|
|
@ -846,13 +856,15 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
Plugins.runHook('rl-start-user-screens');
|
Plugins.runHook('rl-start-user-screens');
|
||||||
|
RL.pub('rl.bootstart-user-screens');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
kn.startScreens([LoginScreen]);
|
kn.startScreens([LoginScreen]);
|
||||||
|
|
||||||
Plugins.runHook('rl-start-login-screens');
|
Plugins.runHook('rl-start-login-screens');
|
||||||
|
RL.pub('rl.bootstart-login-screens');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (window.SimplePace)
|
||||||
|
|
@ -878,6 +890,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
kn.startScreens([LoginScreen]);
|
kn.startScreens([LoginScreen]);
|
||||||
|
|
||||||
Plugins.runHook('rl-start-login-screens');
|
Plugins.runHook('rl-start-login-screens');
|
||||||
|
RL.pub('rl.bootstart-login-screens');
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (window.SimplePace)
|
||||||
{
|
{
|
||||||
|
|
@ -925,6 +938,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
});
|
});
|
||||||
|
|
||||||
Plugins.runHook('rl-start-screens');
|
Plugins.runHook('rl-start-screens');
|
||||||
|
RL.pub('rl.bootstart-end');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,11 @@ Globals.bDisableNanoScroll = Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bAllowOpenPGP = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,16 @@ function MessageModel()
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.body = null;
|
this.body = null;
|
||||||
|
this.plainRaw = '';
|
||||||
this.isRtl = ko.observable(false);
|
this.isRtl = ko.observable(false);
|
||||||
this.isHtml = ko.observable(false);
|
this.isHtml = ko.observable(false);
|
||||||
this.hasImages = ko.observable(false);
|
this.hasImages = ko.observable(false);
|
||||||
this.attachments = ko.observableArray([]);
|
this.attachments = ko.observableArray([]);
|
||||||
|
|
||||||
|
this.isPgpSigned = ko.observable(false);
|
||||||
|
this.isPgpEncrypted = ko.observable(false);
|
||||||
|
this.pgpSignature = ko.observable('');
|
||||||
|
|
||||||
this.priority = ko.observable(Enums.MessagePriority.Normal);
|
this.priority = ko.observable(Enums.MessagePriority.Normal);
|
||||||
this.readReceipt = ko.observable('');
|
this.readReceipt = ko.observable('');
|
||||||
|
|
||||||
|
|
@ -253,6 +258,10 @@ MessageModel.prototype.clear = function ()
|
||||||
this.isHtml(false);
|
this.isHtml(false);
|
||||||
this.hasImages(false);
|
this.hasImages(false);
|
||||||
this.attachments([]);
|
this.attachments([]);
|
||||||
|
|
||||||
|
this.isPgpSigned(false);
|
||||||
|
this.isPgpEncrypted(false);
|
||||||
|
this.pgpSignature('');
|
||||||
|
|
||||||
this.priority(Enums.MessagePriority.Normal);
|
this.priority(Enums.MessagePriority.Normal);
|
||||||
this.readReceipt('');
|
this.readReceipt('');
|
||||||
|
|
@ -347,6 +356,13 @@ MessageModel.prototype.initUpdateByMessageJson = function (oJsonMessage)
|
||||||
this.sInReplyTo = oJsonMessage.InReplyTo;
|
this.sInReplyTo = oJsonMessage.InReplyTo;
|
||||||
this.sReferences = oJsonMessage.References;
|
this.sReferences = oJsonMessage.References;
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP)
|
||||||
|
{
|
||||||
|
this.isPgpSigned(!!oJsonMessage.PgpSigned);
|
||||||
|
this.isPgpEncrypted(!!oJsonMessage.PgpEncrypted);
|
||||||
|
this.pgpSignature(oJsonMessage.PgpSignature);
|
||||||
|
}
|
||||||
|
|
||||||
this.hasAttachments(!!oJsonMessage.HasAttachments);
|
this.hasAttachments(!!oJsonMessage.HasAttachments);
|
||||||
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
|
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
|
||||||
|
|
||||||
|
|
@ -808,6 +824,10 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
||||||
// this.hasImages(false);
|
// this.hasImages(false);
|
||||||
// this.attachments([]);
|
// this.attachments([]);
|
||||||
|
|
||||||
|
// this.isPgpSigned(false);
|
||||||
|
// this.isPgpEncrypted(false);
|
||||||
|
// this.pgpSignature('');
|
||||||
|
|
||||||
this.priority(Enums.MessagePriority.Normal);
|
this.priority(Enums.MessagePriority.Normal);
|
||||||
this.aDraftInfo = [];
|
this.aDraftInfo = [];
|
||||||
this.sMessageId = '';
|
this.sMessageId = '';
|
||||||
|
|
|
||||||
|
|
@ -709,6 +709,10 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
oBody = null,
|
oBody = null,
|
||||||
oTextBody = null,
|
oTextBody = null,
|
||||||
sId = '',
|
sId = '',
|
||||||
|
sPlain = '',
|
||||||
|
bPgpSigned = false,
|
||||||
|
bPgpEncrypted = false,
|
||||||
|
mPgpMessage = null,
|
||||||
oMessagesBodiesDom = this.messagesBodiesDom(),
|
oMessagesBodiesDom = this.messagesBodiesDom(),
|
||||||
oMessage = this.message()
|
oMessage = this.message()
|
||||||
;
|
;
|
||||||
|
|
@ -747,7 +751,57 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
else if (Utils.isNormal(oData.Result.Plain) && '' !== oData.Result.Plain)
|
else if (Utils.isNormal(oData.Result.Plain) && '' !== oData.Result.Plain)
|
||||||
{
|
{
|
||||||
bIsHtml = false;
|
bIsHtml = false;
|
||||||
oBody.html(oData.Result.Plain.toString()).addClass('b-text-part plain');
|
sPlain = oData.Result.Plain.toString();
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP && (oMessage.isPgpSigned() || oMessage.isPgpEncrypted()) &&
|
||||||
|
Utils.isNormal(oData.Result.PlainRaw))
|
||||||
|
{
|
||||||
|
bPgpEncrypted = /---BEGIN PGP MESSAGE---/.test(oData.Result.PlainRaw);
|
||||||
|
if (!bPgpEncrypted)
|
||||||
|
{
|
||||||
|
bPgpSigned = /-----BEGIN PGP SIGNED MESSAGE-----/.test(oData.Result.PlainRaw) &&
|
||||||
|
/-----BEGIN PGP SIGNATURE-----/.test(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bPgpSigned && oMessage.isPgpSigned() && oMessage.pgpSignature())
|
||||||
|
{
|
||||||
|
sPlain = '<pre class="b-plain-openpgp signed">' + oData.Result.PlainRaw + '</pre>';
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mPgpMessage = window.openpgp.cleartext.readArmored(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
catch (oExc) {}
|
||||||
|
|
||||||
|
if (mPgpMessage && mPgpMessage.getText)
|
||||||
|
{
|
||||||
|
sPlain = mPgpMessage.getText();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bPgpSigned = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (bPgpEncrypted && oMessage.isPgpEncrypted())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mPgpMessage = window.openpgp.message.readArmored(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
catch (oExc) {}
|
||||||
|
|
||||||
|
sPlain = '<pre class="b-plain-openpgp encrypted">' + oData.Result.PlainRaw + '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bPgpSigned || bPgpEncrypted)
|
||||||
|
{
|
||||||
|
oBody.data('rl-plain-raw', oData.Result.PlainRaw);
|
||||||
|
oBody.data('rl-plain-pgp-encrypted', bPgpEncrypted);
|
||||||
|
oBody.data('rl-plain-pgp-signed', bPgpSigned);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
oBody.html(sPlain).addClass('b-text-part plain');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -760,15 +814,19 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
oBody.addClass('rtl-text-part');
|
oBody.addClass('rtl-text-part');
|
||||||
}
|
}
|
||||||
|
|
||||||
oMessagesBodiesDom.append(oBody);
|
|
||||||
|
|
||||||
oBody.data('rl-is-html', bIsHtml);
|
|
||||||
oBody.data('rl-has-images', bHasExternals);
|
|
||||||
|
|
||||||
oMessage.isRtl(!!oBody.data('rl-is-rtl'));
|
|
||||||
oMessage.isHtml(!!oBody.data('rl-is-html'));
|
|
||||||
oMessage.hasImages(!!oBody.data('rl-has-images'));
|
|
||||||
oMessage.body = oBody;
|
oMessage.body = oBody;
|
||||||
|
if (oMessage.body)
|
||||||
|
{
|
||||||
|
oMessagesBodiesDom.append(oMessage.body);
|
||||||
|
|
||||||
|
oMessage.body.data('rl-is-html', bIsHtml);
|
||||||
|
oMessage.body.data('rl-has-images', bHasExternals);
|
||||||
|
|
||||||
|
oMessage.isRtl(!!oMessage.body.data('rl-is-rtl'));
|
||||||
|
oMessage.isHtml(!!oMessage.body.data('rl-is-html'));
|
||||||
|
oMessage.hasImages(!!oMessage.body.data('rl-has-images'));
|
||||||
|
oMessage.plainRaw = Utils.pString(oMessage.body.data('rl-plain-raw'));
|
||||||
|
}
|
||||||
|
|
||||||
if (bHasInternals)
|
if (bHasInternals)
|
||||||
{
|
{
|
||||||
|
|
@ -784,12 +842,26 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
oTextBody.data('rl-cache-count', ++Globals.iMessageBodyCacheCount);
|
|
||||||
|
|
||||||
oMessage.isRtl(!!oTextBody.data('rl-is-rtl'));
|
|
||||||
oMessage.isHtml(!!oTextBody.data('rl-is-html'));
|
|
||||||
oMessage.hasImages(!!oTextBody.data('rl-has-images'));
|
|
||||||
oMessage.body = oTextBody;
|
oMessage.body = oTextBody;
|
||||||
|
if (oMessage.body)
|
||||||
|
{
|
||||||
|
oMessage.body.data('rl-cache-count', ++Globals.iMessageBodyCacheCount);
|
||||||
|
oMessage.isRtl(!!oMessage.body.data('rl-is-rtl'));
|
||||||
|
oMessage.isHtml(!!oMessage.body.data('rl-is-html'));
|
||||||
|
oMessage.hasImages(!!oMessage.body.data('rl-has-images'));
|
||||||
|
oMessage.plainRaw = Utils.pString(oMessage.body.data('rl-plain-raw'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP && oMessage.body)
|
||||||
|
{
|
||||||
|
oMessage.isPgpSigned(!!oMessage.body.data('rl-plain-pgp-signed'));
|
||||||
|
oMessage.isPgpEncrypted(!!oMessage.body.data('rl-plain-pgp-encrypted'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
oMessage.isPgpSigned(false);
|
||||||
|
oMessage.isPgpEncrypted(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.messageActiveDom(oMessage.body);
|
this.messageActiveDom(oMessage.body);
|
||||||
|
|
|
||||||
|
|
@ -145,24 +145,4 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.editorTextArea, .editorHtmlArea {
|
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
color: #000;
|
|
||||||
font-family: Arial, Verdana, Geneva, sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: separate;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border: 0;
|
|
||||||
border-left: solid 2px #444;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin: 5px 0;
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -76,12 +76,15 @@
|
||||||
|
|
||||||
.box-sizing(border-box);
|
.box-sizing(border-box);
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
font-family: arial, sans-serif;
|
font-family: Arial, Verdana, Geneva, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
line-height: 16px;
|
line-height: 15px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
|
||||||
|
|
@ -102,9 +105,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
|
border: 0;
|
||||||
border-left: solid 2px #444;
|
border-left: solid 2px #444;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
padding-left: 5px
|
margin: 5px 0;
|
||||||
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
@ -119,14 +124,17 @@
|
||||||
.editorTextArea {
|
.editorTextArea {
|
||||||
.box-sizing(border-box);
|
.box-sizing(border-box);
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 16px;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-family: arial, sans-serif;
|
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
|
line-height: 15px;
|
||||||
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ html.rl-no-preview-pane {
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.showImages, .readReceipt {
|
.showImages, .readReceipt, .pgpSigned, .pgpEncrypted {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
|
@ -192,6 +192,10 @@ html.rl-no-preview-pane {
|
||||||
background-color: #ffffd9;
|
background-color: #ffffd9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pgpSigned, .pgpEncrypted {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
.attachmentsPlace {
|
.attachmentsPlace {
|
||||||
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
@ -306,16 +310,15 @@ html.rl-no-preview-pane {
|
||||||
&.plain {
|
&.plain {
|
||||||
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-family: arial, sans-serif;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
white-space: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 2px solid blue;
|
border-left: 2px solid blue;
|
||||||
color: blue;
|
color: blue;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ function MailBoxMessageViewViewModel()
|
||||||
this.viewDownloadLink = ko.observable('');
|
this.viewDownloadLink = ko.observable('');
|
||||||
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
|
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
|
||||||
this.viewUserPicVisible = ko.observable(false);
|
this.viewUserPicVisible = ko.observable(false);
|
||||||
|
|
||||||
this.message.subscribe(function (oMessage) {
|
this.message.subscribe(function (oMessage) {
|
||||||
|
|
||||||
this.messageActiveDom(null);
|
this.messageActiveDom(null);
|
||||||
|
|
|
||||||
|
|
@ -103,11 +103,6 @@ class Message
|
||||||
*/
|
*/
|
||||||
private $sPlain;
|
private $sPlain;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $sPlainRaw;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
@ -168,6 +163,16 @@ class Message
|
||||||
*/
|
*/
|
||||||
private $sPgpSignature;
|
private $sPgpSignature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $bPgpSigned;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private $bPgpEncrypted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
|
|
@ -201,7 +206,6 @@ class Message
|
||||||
$this->oBcc = null;
|
$this->oBcc = null;
|
||||||
|
|
||||||
$this->sPlain = '';
|
$this->sPlain = '';
|
||||||
$this->sPlainRaw = '';
|
|
||||||
$this->sHtml = '';
|
$this->sHtml = '';
|
||||||
|
|
||||||
$this->oAttachments = null;
|
$this->oAttachments = null;
|
||||||
|
|
@ -220,6 +224,8 @@ class Message
|
||||||
$this->iParentThread = 0;
|
$this->iParentThread = 0;
|
||||||
|
|
||||||
$this->sPgpSignature = '';
|
$this->sPgpSignature = '';
|
||||||
|
$this->bPgpSigned = false;
|
||||||
|
$this->bPgpEncrypted = false;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
@ -240,14 +246,6 @@ class Message
|
||||||
return $this->sPlain;
|
return $this->sPlain;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function PlainRaw()
|
|
||||||
{
|
|
||||||
return $this->sPlainRaw;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
@ -264,6 +262,22 @@ class Message
|
||||||
return $this->sPgpSignature;
|
return $this->sPgpSignature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function PgpSigned()
|
||||||
|
{
|
||||||
|
return $this->bPgpSigned;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function PgpEncrypted()
|
||||||
|
{
|
||||||
|
return $this->bPgpEncrypted;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sHtml
|
* @param string $sHtml
|
||||||
*
|
*
|
||||||
|
|
@ -776,24 +790,20 @@ class Message
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->sPlain = \implode("\n", $sPlainParts);
|
$this->sPlain = \trim(\implode("\n", $sPlainParts));
|
||||||
$this->sPlainRaw = $this->sPlain;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$aMatch = array();
|
$aMatch = array();
|
||||||
if (\preg_match('/-----BEGIN PGP SIGNATURE-----(.+)-----END PGP SIGNATURE-----/ism', $this->sPlain, $aMatch) && !empty($aMatch[0]))
|
if (\preg_match('/-----BEGIN PGP SIGNATURE-----(.+)-----END PGP SIGNATURE-----/ism', $this->sPlain, $aMatch) && !empty($aMatch[0]))
|
||||||
{
|
{
|
||||||
$this->sPgpSignature = $aMatch[0];
|
$this->sPgpSignature = \trim($aMatch[0]);
|
||||||
$this->sPlain = \trim($this->sPlain);
|
$this->bPgpSigned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aMatch = array();
|
$aMatch = array();
|
||||||
if (!empty($this->sPgpSignature) &&
|
if (\preg_match('/-----BEGIN PGP MESSAGE-----/ism', $this->sPlain, $aMatch) && !empty($aMatch[0]))
|
||||||
\preg_match('/-----BEGIN PGP SIGNED MESSAGE-----(.+)-----BEGIN PGP SIGNATURE-----(.+)-----END PGP SIGNATURE-----/ism', $this->sPlain, $aMatch) &&
|
|
||||||
!empty($aMatch[0]) && isset($aMatch[1]))
|
|
||||||
{
|
{
|
||||||
$this->sPlain = \str_replace($aMatch[0], $aMatch[1], $this->sPlain);
|
$this->bPgpEncrypted = true;
|
||||||
$this->sPlain = \trim(\preg_replace('/^Hash: [^\s]+/i', '', \trim($this->sPlain)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($sHtmlParts, $sPlainParts, $aMatch);
|
unset($sHtmlParts, $sPlainParts, $aMatch);
|
||||||
|
|
@ -812,6 +822,7 @@ class Message
|
||||||
if (\is_string($sPgpSignatureText) && 0 < \strlen($sPgpSignatureText) && 0 < \strpos($sPgpSignatureText, 'BEGIN PGP SIGNATURE'))
|
if (\is_string($sPgpSignatureText) && 0 < \strlen($sPgpSignatureText) && 0 < \strpos($sPgpSignatureText, 'BEGIN PGP SIGNATURE'))
|
||||||
{
|
{
|
||||||
$this->sPgpSignature = \trim($sPgpSignatureText);
|
$this->sPgpSignature = \trim($sPgpSignatureText);
|
||||||
|
$this->bPgpSigned = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -902,6 +902,7 @@ class Actions
|
||||||
'LoginDescription' => $oConfig->Get('branding', 'login_desc', ''),
|
'LoginDescription' => $oConfig->Get('branding', 'login_desc', ''),
|
||||||
'LoginCss' => $oConfig->Get('branding', 'login_css', ''),
|
'LoginCss' => $oConfig->Get('branding', 'login_css', ''),
|
||||||
'Token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '',
|
'Token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '',
|
||||||
|
'OpenPGP' => $oConfig->Get('security', 'openpgp', false),
|
||||||
'InIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false),
|
'InIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false),
|
||||||
'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
|
'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
|
||||||
'CustomLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''),
|
'CustomLoginLink' => $oConfig->Get('labs', 'custom_login_link', ''),
|
||||||
|
|
@ -1955,6 +1956,7 @@ class Actions
|
||||||
$this->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string');
|
$this->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string');
|
||||||
|
|
||||||
$this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool');
|
$this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool');
|
||||||
|
$this->setConfigFromParams($oConfig, 'OpenPGP', 'security', 'openpgp', 'bool');
|
||||||
$this->setConfigFromParams($oConfig, 'EnabledPlugins', 'plugins', 'enable', 'bool');
|
$this->setConfigFromParams($oConfig, 'EnabledPlugins', 'plugins', 'enable', 'bool');
|
||||||
|
|
||||||
$this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
|
$this->setConfigFromParams($oConfig, 'GoogleEnable', 'social', 'google_enable', 'bool');
|
||||||
|
|
@ -6320,14 +6322,13 @@ class Actions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sPlain = $sPlainRaw = '';
|
$sPlain = '';
|
||||||
$sHtml = $mResponse->Html();
|
$sHtml = $mResponse->Html();
|
||||||
$bRtl = false;
|
$bRtl = false;
|
||||||
|
|
||||||
if (0 === \strlen($sHtml))
|
if (0 === \strlen($sHtml))
|
||||||
{
|
{
|
||||||
$sPlain = $mResponse->Plain();
|
$sPlain = $mResponse->Plain();
|
||||||
$sPlainRaw = $mResponse->PlainRaw();
|
|
||||||
$bRtl = \MailSo\Base\Utils::IsRTL($sPlain);
|
$bRtl = \MailSo\Base\Utils::IsRTL($sPlain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -6341,13 +6342,15 @@ class Actions
|
||||||
$mResult['Html'] = 0 === \strlen($sHtml) ? '' : \MailSo\Base\HtmlUtils::ClearHtml(
|
$mResult['Html'] = 0 === \strlen($sHtml) ? '' : \MailSo\Base\HtmlUtils::ClearHtml(
|
||||||
$sHtml, $bHasExternals, $mFoundedCIDs, $aContentLocationUrls, $mFoundedContentLocationUrls);
|
$sHtml, $bHasExternals, $mFoundedCIDs, $aContentLocationUrls, $mFoundedContentLocationUrls);
|
||||||
|
|
||||||
|
$mResult['PlainRaw'] = $sPlain;
|
||||||
$mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain);
|
$mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain);
|
||||||
$mResult['PlainRaw'] = $sPlainRaw;
|
|
||||||
$mResult['Rtl'] = $bRtl;
|
$mResult['Rtl'] = $bRtl;
|
||||||
|
|
||||||
|
$mResult['PgpSigned'] = $mResponse->PgpSigned();
|
||||||
|
$mResult['PgpEncrypted'] = $mResponse->PgpEncrypted();
|
||||||
$mResult['PgpSignature'] = $mResponse->PgpSignature();
|
$mResult['PgpSignature'] = $mResponse->PgpSignature();
|
||||||
|
|
||||||
unset($sHtml, $sPlain, $sPlainRaw);
|
unset($sHtml, $sPlain);
|
||||||
|
|
||||||
$mResult['HasExternals'] = $bHasExternals;
|
$mResult['HasExternals'] = $bHasExternals;
|
||||||
$mResult['HasInternals'] = (\is_array($mFoundedCIDs) && 0 < \count($mFoundedCIDs)) ||
|
$mResult['HasInternals'] = (\is_array($mFoundedCIDs) && 0 < \count($mFoundedCIDs)) ||
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
||||||
'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'),
|
'Enable CSRF protection (http://en.wikipedia.org/wiki/Cross-site_request_forgery)'),
|
||||||
|
|
||||||
'custom_server_signature' => array('RainLoop'),
|
'custom_server_signature' => array('RainLoop'),
|
||||||
|
'openpgp' => array(false),
|
||||||
'admin_login' => array('admin', 'Login and password for web admin panel'),
|
'admin_login' => array('admin', 'Login and password for web admin panel'),
|
||||||
'admin_password' => array('12345'),
|
'admin_password' => array('12345'),
|
||||||
'allow_admin_panel' => array(true, 'Access settings'),
|
'allow_admin_panel' => array(true, 'Access settings'),
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,15 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<label data-bind="click: function () { openPGP(!openPGP()); }">
|
||||||
|
<i data-bind="css: openPGP() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||||
|
|
||||||
|
Allow OpenPGP (beta)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a href="#" target="_blank" class="g-ui-link" data-bind="link: phpInfoLink()">Show PHP information</a>
|
<a href="#" target="_blank" class="g-ui-link" data-bind="link: phpInfoLink()">Show PHP information</a>
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,16 @@
|
||||||
|
|
||||||
<span class="i18n text" data-i18n-text="MESSAGE/BUTTON_NOTIFY_READ_RECEIPT"></span>
|
<span class="i18n text" data-i18n-text="MESSAGE/BUTTON_NOTIFY_READ_RECEIPT"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pgpSigned" data-bind="visible: message() && message().isPgpSigned(), click: function() {}">
|
||||||
|
<i class="icon-lock"></i>
|
||||||
|
|
||||||
|
PGP signed
|
||||||
|
</div>
|
||||||
|
<div class="pgpEncrypted" data-bind="visible: message() && message().isPgpEncrypted(), click: function() {}">
|
||||||
|
<i class="icon-lock"></i>
|
||||||
|
|
||||||
|
PGP encrypted
|
||||||
|
</div>
|
||||||
<div class="attachmentsPlace" data-bind="visible: message() && message().hasVisibleAttachments()">
|
<div class="attachmentsPlace" data-bind="visible: message() && message().hasVisibleAttachments()">
|
||||||
<ul class="attachmentList" data-bind="foreach: message() ? message().attachments() : []">
|
<ul class="attachmentList" data-bind="foreach: message() ? message().attachments() : []">
|
||||||
<li class="attachmentItem" draggable="true" data-bind="visible: !isLinked, title: fileName, event: { 'dragstart': eventDragStart }">
|
<li class="attachmentItem" draggable="true" data-bind="visible: !isLinked, title: fileName, event: { 'dragstart': eventDragStart }">
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
|
||||||
|
|
||||||
/* =============================================================================
|
/* =============================================================================
|
||||||
|
|
@ -1142,7 +1142,7 @@ table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
@ -1474,7 +1474,7 @@ table {
|
||||||
.icon-mail:before {
|
.icon-mail:before {
|
||||||
content: "\e062";
|
content: "\e062";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** initial setup **/
|
/** initial setup **/
|
||||||
.nano {
|
.nano {
|
||||||
/*
|
/*
|
||||||
|
|
@ -1591,7 +1591,7 @@ table {
|
||||||
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Magnific Popup CSS */
|
/* Magnific Popup CSS */
|
||||||
.mfp-bg {
|
.mfp-bg {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -1956,7 +1956,7 @@ img.mfp-img {
|
||||||
right: 0;
|
right: 0;
|
||||||
padding-top: 0; }
|
padding-top: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* overlay at start */
|
/* overlay at start */
|
||||||
.mfp-fade.mfp-bg {
|
.mfp-fade.mfp-bg {
|
||||||
|
|
@ -2002,7 +2002,7 @@ img.mfp-img {
|
||||||
-moz-transform: translateX(50px);
|
-moz-transform: translateX(50px);
|
||||||
transform: translateX(50px);
|
transform: translateX(50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple-pace {
|
.simple-pace {
|
||||||
-webkit-pointer-events: none;
|
-webkit-pointer-events: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
@ -2073,7 +2073,7 @@ img.mfp-img {
|
||||||
@keyframes simple-pace-stripe-animation {
|
@keyframes simple-pace-stripe-animation {
|
||||||
0% { transform: none; transform: none; }
|
0% { transform: none; transform: none; }
|
||||||
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
|
||||||
}
|
}
|
||||||
.inputosaurus-container {
|
.inputosaurus-container {
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
border:1px solid #bcbec0;
|
border:1px solid #bcbec0;
|
||||||
|
|
@ -2141,7 +2141,7 @@ img.mfp-img {
|
||||||
box-shadow:none;
|
box-shadow:none;
|
||||||
}
|
}
|
||||||
.inputosaurus-input-hidden { display:none; }
|
.inputosaurus-input-hidden { display:none; }
|
||||||
|
|
||||||
.flag-wrapper {
|
.flag-wrapper {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
@ -2182,7 +2182,7 @@ img.mfp-img {
|
||||||
.flag.flag-pt-br {background-position: -192px -11px}
|
.flag.flag-pt-br {background-position: -192px -11px}
|
||||||
|
|
||||||
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
.flag.flag-cn, .flag.flag-zh-tw, .flag.flag-zh-cn, .flag.flag-zh-hk {background-position: -208px -22px}
|
||||||
|
|
||||||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
.clearfix {
|
.clearfix {
|
||||||
*zoom: 1;
|
*zoom: 1;
|
||||||
|
|
@ -7064,7 +7064,9 @@ showImages html.rl-no-preview-pane .messageView.message-selected {
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
.messageView .b-content .messageItem .showImages,
|
.messageView .b-content .messageItem .showImages,
|
||||||
.messageView .b-content .messageItem .readReceipt {
|
.messageView .b-content .messageItem .readReceipt,
|
||||||
|
.messageView .b-content .messageItem .pgpSigned,
|
||||||
|
.messageView .b-content .messageItem .pgpEncrypted {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
|
@ -7073,6 +7075,10 @@ showImages html.rl-no-preview-pane .messageView.message-selected {
|
||||||
.messageView .b-content .messageItem .readReceipt {
|
.messageView .b-content .messageItem .readReceipt {
|
||||||
background-color: #ffffd9;
|
background-color: #ffffd9;
|
||||||
}
|
}
|
||||||
|
.messageView .b-content .messageItem .pgpSigned,
|
||||||
|
.messageView .b-content .messageItem .pgpEncrypted {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
.messageView .b-content .messageItem .attachmentsPlace {
|
.messageView .b-content .messageItem .attachmentsPlace {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
@ -7165,14 +7171,13 @@ showImages html.rl-no-preview-pane .messageView.message-selected {
|
||||||
}
|
}
|
||||||
.messageView .b-content .messageItem .bodyText .b-text-part.plain {
|
.messageView .b-content .messageItem .bodyText .b-text-part.plain {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||||
}
|
}
|
||||||
.messageView .b-content .messageItem .bodyText .b-text-part.plain pre {
|
.messageView .b-content .messageItem .bodyText .b-text-part.plain pre {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
font-family: arial, sans-serif;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
white-space: normal;
|
|
||||||
}
|
}
|
||||||
.messageView .b-content .messageItem .bodyText .b-text-part.plain blockquote {
|
.messageView .b-content .messageItem .bodyText .b-text-part.plain blockquote {
|
||||||
border-left: 2px solid blue;
|
border-left: 2px solid blue;
|
||||||
|
|
@ -7686,25 +7691,6 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
|
||||||
background: #777;
|
background: #777;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.b-compose .editorTextArea,
|
|
||||||
.b-compose .editorHtmlArea {
|
|
||||||
background: #fff;
|
|
||||||
color: #000;
|
|
||||||
font-family: Arial, Verdana, Geneva, sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.b-compose .editorTextArea table,
|
|
||||||
.b-compose .editorHtmlArea table {
|
|
||||||
border-collapse: separate;
|
|
||||||
}
|
|
||||||
.b-compose .editorTextArea blockquote,
|
|
||||||
.b-compose .editorHtmlArea blockquote {
|
|
||||||
border: 0;
|
|
||||||
border-left: solid 2px #444;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin: 5px 0;
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
.b-admin-left .b-toolbar {
|
.b-admin-left .b-toolbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -8650,12 +8636,14 @@ html.rl-started-trigger.no-mobile #rl-content {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
font-family: arial, sans-serif;
|
font-family: Arial, Verdana, Geneva, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
line-height: 16px;
|
line-height: 15px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
@ -8672,8 +8660,10 @@ html.rl-started-trigger.no-mobile #rl-content {
|
||||||
list-style-type: decimal !important;
|
list-style-type: decimal !important;
|
||||||
}
|
}
|
||||||
.textAreaParent .editorHtmlArea blockquote {
|
.textAreaParent .editorHtmlArea blockquote {
|
||||||
|
border: 0;
|
||||||
border-left: solid 2px #444;
|
border-left: solid 2px #444;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
margin: 5px 0;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
.textAreaParent .editorHtmlArea img {
|
.textAreaParent .editorHtmlArea img {
|
||||||
|
|
@ -8686,14 +8676,16 @@ html.rl-started-trigger.no-mobile #rl-content {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
display: block;
|
display: block;
|
||||||
border: 0px !important;
|
border: 0px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 16px;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-family: arial, sans-serif;
|
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
|
line-height: 15px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
(function (window, $, ko, crossroads, hasher, _) {
|
(function (window, $, ko, crossroads, hasher, _) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
@ -70,14 +70,14 @@ var
|
||||||
$document = $(window.document),
|
$document = $(window.document),
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?AdminApp}
|
* @type {?AdminApp}
|
||||||
*/
|
*/
|
||||||
var RL = null;
|
var RL = null;
|
||||||
/*jshint onevar: true*/
|
/*jshint onevar: true*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {?}
|
* @type {?}
|
||||||
*/
|
*/
|
||||||
|
|
@ -143,6 +143,11 @@ Globals.bDisableNanoScroll = Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bAllowOpenPGP = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
@ -159,7 +164,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
||||||
return oType && 'application/pdf' === oType.type;
|
return oType && 'application/pdf' === oType.type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Consts.Defaults = {};
|
Consts.Defaults = {};
|
||||||
Consts.Values = {};
|
Consts.Values = {};
|
||||||
Consts.DataImages = {};
|
Consts.DataImages = {};
|
||||||
|
|
@ -277,7 +282,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
|
|
@ -613,7 +618,7 @@ Enums.Notification = {
|
||||||
'UnknownNotification': 999,
|
'UnknownNotification': 999,
|
||||||
'UnknownError': 999
|
'UnknownError': 999
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.trim = $.trim;
|
Utils.trim = $.trim;
|
||||||
Utils.inArray = $.inArray;
|
Utils.inArray = $.inArray;
|
||||||
Utils.isArray = _.isArray;
|
Utils.isArray = _.isArray;
|
||||||
|
|
@ -2179,7 +2184,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||||
return aResult;
|
return aResult;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Base64 encode / decode
|
// Base64 encode / decode
|
||||||
// http://www.webtoolkit.info/
|
// http://www.webtoolkit.info/
|
||||||
|
|
||||||
|
|
@ -2342,7 +2347,7 @@ Base64 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*jslint bitwise: false*/
|
/*jslint bitwise: false*/
|
||||||
ko.bindingHandlers.tooltip = {
|
ko.bindingHandlers.tooltip = {
|
||||||
'init': function (oElement, fValueAccessor) {
|
'init': function (oElement, fValueAccessor) {
|
||||||
if (!Globals.bMobileDevice)
|
if (!Globals.bMobileDevice)
|
||||||
|
|
@ -2964,7 +2969,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3254,7 +3259,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
||||||
{
|
{
|
||||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
|
|
@ -3348,7 +3353,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3422,7 +3427,7 @@ CookieDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3494,7 +3499,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3537,7 +3542,7 @@ LocalStorage.prototype.get = function (iKey)
|
||||||
{
|
{
|
||||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3550,7 +3555,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string=} sPosition = ''
|
* @param {string=} sPosition = ''
|
||||||
* @param {string=} sTemplate = ''
|
* @param {string=} sTemplate = ''
|
||||||
|
|
@ -3610,7 +3615,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
|
||||||
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} sScreenName
|
* @param {string} sScreenName
|
||||||
* @param {?=} aViewModels = []
|
* @param {?=} aViewModels = []
|
||||||
|
|
@ -3686,7 +3691,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
||||||
this.oCross = oRoute;
|
this.oCross = oRoute;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4077,7 +4082,7 @@ Knoin.prototype.bootstart = function ()
|
||||||
};
|
};
|
||||||
|
|
||||||
kn = new Knoin();
|
kn = new Knoin();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string=} sEmail
|
* @param {string=} sEmail
|
||||||
* @param {string=} sName
|
* @param {string=} sName
|
||||||
|
|
@ -4441,7 +4446,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
||||||
{
|
{
|
||||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -4661,7 +4666,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
||||||
this.smtpAuth(true);
|
this.smtpAuth(true);
|
||||||
this.whiteList('');
|
this.whiteList('');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -4798,7 +4803,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -4914,7 +4919,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
|
||||||
{
|
{
|
||||||
var sValue = this.key();
|
var sValue = this.key();
|
||||||
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -4988,7 +4993,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
||||||
RL.data().mainLanguage(sLang);
|
RL.data().mainLanguage(sLang);
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -5106,7 +5111,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -5193,7 +5198,7 @@ AdminLoginViewModel.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
this.loginFocus(false);
|
this.loginFocus(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?} oScreen
|
* @param {?} oScreen
|
||||||
*
|
*
|
||||||
|
|
@ -5215,7 +5220,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
|
||||||
{
|
{
|
||||||
return '#/' + sRoute;
|
return '#/' + sRoute;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -5237,7 +5242,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
|
||||||
RL.remote().adminLogout(function () {
|
RL.remote().adminLogout(function () {
|
||||||
RL.loginAndLogoutReload();
|
RL.loginAndLogoutReload();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5337,7 +5342,7 @@ AdminGeneral.prototype.selectLanguage = function ()
|
||||||
{
|
{
|
||||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5389,7 +5394,7 @@ AdminLogin.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5458,7 +5463,7 @@ AdminBranding.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5678,7 +5683,7 @@ AdminContacts.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5767,13 +5772,14 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
|
||||||
{
|
{
|
||||||
RL.reloadDomainList();
|
RL.reloadDomainList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function AdminSecurity()
|
function AdminSecurity()
|
||||||
{
|
{
|
||||||
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
|
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
|
||||||
|
this.openPGP = ko.observable(!!RL.settingsGet('OpenPGP'));
|
||||||
|
|
||||||
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
||||||
this.adminPassword = ko.observable('');
|
this.adminPassword = ko.observable('');
|
||||||
|
|
@ -5833,6 +5839,12 @@ AdminSecurity.prototype.onBuild = function ()
|
||||||
'TokenProtection': bValue ? '1' : '0'
|
'TokenProtection': bValue ? '1' : '0'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.openPGP.subscribe(function (bValue) {
|
||||||
|
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||||
|
'OpenPGP': bValue ? '1' : '0'
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
AdminSecurity.prototype.onHide = function ()
|
AdminSecurity.prototype.onHide = function ()
|
||||||
|
|
@ -5848,7 +5860,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
|
||||||
{
|
{
|
||||||
return RL.link().phpInfo();
|
return RL.link().phpInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5964,7 +5976,7 @@ AdminSocial.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6061,7 +6073,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
||||||
|
|
||||||
RL.reloadPluginList();
|
RL.reloadPluginList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6165,7 +6177,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
|
||||||
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6216,7 +6228,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
|
||||||
{
|
{
|
||||||
var oDate = moment.unix(this.licenseExpired());
|
var oDate = moment.unix(this.licenseExpired());
|
||||||
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
|
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6285,7 +6297,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
||||||
|
|
||||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractData
|
* @extends AbstractData
|
||||||
|
|
@ -6319,7 +6331,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
|
||||||
AdminDataStorage.prototype.populateDataOnStart = function()
|
AdminDataStorage.prototype.populateDataOnStart = function()
|
||||||
{
|
{
|
||||||
AbstractData.prototype.populateDataOnStart.call(this);
|
AbstractData.prototype.populateDataOnStart.call(this);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6593,7 +6605,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
||||||
'Version': sVersion
|
'Version': sVersion
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractAjaxRemoteStorage
|
* @extends AbstractAjaxRemoteStorage
|
||||||
|
|
@ -6837,7 +6849,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
|
||||||
{
|
{
|
||||||
this.defaultRequest(fCallback, 'AdminPing');
|
this.defaultRequest(fCallback, 'AdminPing');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6903,7 +6915,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
||||||
{
|
{
|
||||||
this.oEmailsPicsHashes = oData;
|
this.oEmailsPicsHashes = oData;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractCacheStorage
|
* @extends AbstractCacheStorage
|
||||||
|
|
@ -6914,7 +6926,7 @@ function AdminCacheStorage()
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array} aViewModels
|
* @param {Array} aViewModels
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
@ -7091,7 +7103,7 @@ AbstractSettings.prototype.routes = function ()
|
||||||
['', oRules]
|
['', oRules]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractScreen
|
* @extends KnoinAbstractScreen
|
||||||
|
|
@ -7106,7 +7118,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
AdminLoginScreen.prototype.onShow = function ()
|
AdminLoginScreen.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractSettings
|
* @extends AbstractSettings
|
||||||
|
|
@ -7126,7 +7138,7 @@ AdminSettingsScreen.prototype.onShow = function ()
|
||||||
// AbstractSettings.prototype.onShow.call(this);
|
// AbstractSettings.prototype.onShow.call(this);
|
||||||
|
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractBoot
|
* @extends KnoinAbstractBoot
|
||||||
|
|
@ -7365,6 +7377,7 @@ AbstractApp.prototype.sub = function (sName, fFunc, oContext)
|
||||||
*/
|
*/
|
||||||
AbstractApp.prototype.pub = function (sName, aArgs)
|
AbstractApp.prototype.pub = function (sName, aArgs)
|
||||||
{
|
{
|
||||||
|
Plugins.runHook('rl-pub', [sName, aArgs]);
|
||||||
if (!Utils.isUnd(this.oSubs[sName]))
|
if (!Utils.isUnd(this.oSubs[sName]))
|
||||||
{
|
{
|
||||||
_.each(this.oSubs[sName], function (aItem) {
|
_.each(this.oSubs[sName], function (aItem) {
|
||||||
|
|
@ -7436,7 +7449,7 @@ AbstractApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
ssm.ready();
|
ssm.ready();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractApp
|
* @extends AbstractApp
|
||||||
|
|
@ -7683,7 +7696,7 @@ AdminApp.prototype.bootstart = function ()
|
||||||
* @type {AdminApp}
|
* @type {AdminApp}
|
||||||
*/
|
*/
|
||||||
RL = new AdminApp();
|
RL = new AdminApp();
|
||||||
|
|
||||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||||
|
|
||||||
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||||
|
|
@ -7730,9 +7743,9 @@ window['__RLBOOT'] = function (fCall) {
|
||||||
window['__RLBOOT'] = null;
|
window['__RLBOOT'] = null;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.SimplePace) {
|
if (window.SimplePace) {
|
||||||
window.SimplePace.add(10);
|
window.SimplePace.add(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
}(window, jQuery, ko, crossroads, hasher, _));
|
}(window, jQuery, ko, crossroads, hasher, _));
|
||||||
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||||
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
|
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
@ -70,14 +70,14 @@ var
|
||||||
$document = $(window.document),
|
$document = $(window.document),
|
||||||
|
|
||||||
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
|
||||||
;
|
;
|
||||||
/*jshint onevar: false*/
|
/*jshint onevar: false*/
|
||||||
/**
|
/**
|
||||||
* @type {?RainLoopApp}
|
* @type {?RainLoopApp}
|
||||||
*/
|
*/
|
||||||
var RL = null;
|
var RL = null;
|
||||||
/*jshint onevar: true*/
|
/*jshint onevar: true*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {?}
|
* @type {?}
|
||||||
*/
|
*/
|
||||||
|
|
@ -143,6 +143,11 @@ Globals.bDisableNanoScroll = Globals.bMobileDevice;
|
||||||
*/
|
*/
|
||||||
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
Globals.bAllowPdfPreview = !Globals.bMobileDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
Globals.bAllowOpenPGP = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
@ -159,7 +164,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
|
||||||
return oType && 'application/pdf' === oType.type;
|
return oType && 'application/pdf' === oType.type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Consts.Defaults = {};
|
Consts.Defaults = {};
|
||||||
Consts.Values = {};
|
Consts.Values = {};
|
||||||
Consts.DataImages = {};
|
Consts.DataImages = {};
|
||||||
|
|
@ -277,7 +282,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
|
|
@ -613,7 +618,7 @@ Enums.Notification = {
|
||||||
'UnknownNotification': 999,
|
'UnknownNotification': 999,
|
||||||
'UnknownError': 999
|
'UnknownError': 999
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.trim = $.trim;
|
Utils.trim = $.trim;
|
||||||
Utils.inArray = $.inArray;
|
Utils.inArray = $.inArray;
|
||||||
Utils.isArray = _.isArray;
|
Utils.isArray = _.isArray;
|
||||||
|
|
@ -2179,7 +2184,7 @@ Utils.computedPagenatorHelper = function (koCurrentPage, koPageCount)
|
||||||
return aResult;
|
return aResult;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Base64 encode / decode
|
// Base64 encode / decode
|
||||||
// http://www.webtoolkit.info/
|
// http://www.webtoolkit.info/
|
||||||
|
|
||||||
|
|
@ -2342,7 +2347,7 @@ Base64 = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*jslint bitwise: false*/
|
/*jslint bitwise: false*/
|
||||||
ko.bindingHandlers.tooltip = {
|
ko.bindingHandlers.tooltip = {
|
||||||
'init': function (oElement, fValueAccessor) {
|
'init': function (oElement, fValueAccessor) {
|
||||||
if (!Globals.bMobileDevice)
|
if (!Globals.bMobileDevice)
|
||||||
|
|
@ -2964,7 +2969,7 @@ ko.observable.fn.validateFunc = function (fFunc)
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -3254,7 +3259,7 @@ LinkBuilder.prototype.socialFacebook = function ()
|
||||||
{
|
{
|
||||||
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
|
|
@ -3348,7 +3353,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4244,7 +4249,7 @@ HtmlEditor.htmlFunctions = {
|
||||||
}, this), this.toolbar);
|
}, this), this.toolbar);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {koProperty} oKoList
|
* @param {koProperty} oKoList
|
||||||
|
|
@ -4785,7 +4790,7 @@ Selector.prototype.on = function (sEventName, fCallback)
|
||||||
{
|
{
|
||||||
this.oCallbacks[sEventName] = fCallback;
|
this.oCallbacks[sEventName] = fCallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4859,7 +4864,7 @@ CookieDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4931,7 +4936,7 @@ LocalStorageDriver.prototype.get = function (sKey)
|
||||||
|
|
||||||
return mResult;
|
return mResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4974,7 +4979,7 @@ LocalStorage.prototype.get = function (iKey)
|
||||||
{
|
{
|
||||||
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -4987,7 +4992,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string=} sPosition = ''
|
* @param {string=} sPosition = ''
|
||||||
* @param {string=} sTemplate = ''
|
* @param {string=} sTemplate = ''
|
||||||
|
|
@ -5047,7 +5052,7 @@ KnoinAbstractViewModel.prototype.viewModelPosition = function ()
|
||||||
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
KnoinAbstractViewModel.prototype.cancelCommand = KnoinAbstractViewModel.prototype.closeCommand = function ()
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} sScreenName
|
* @param {string} sScreenName
|
||||||
* @param {?=} aViewModels = []
|
* @param {?=} aViewModels = []
|
||||||
|
|
@ -5123,7 +5128,7 @@ KnoinAbstractScreen.prototype.__start = function ()
|
||||||
this.oCross = oRoute;
|
this.oCross = oRoute;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -5514,7 +5519,7 @@ Knoin.prototype.bootstart = function ()
|
||||||
};
|
};
|
||||||
|
|
||||||
kn = new Knoin();
|
kn = new Knoin();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string=} sEmail
|
* @param {string=} sEmail
|
||||||
* @param {string=} sName
|
* @param {string=} sName
|
||||||
|
|
@ -5878,7 +5883,7 @@ EmailModel.prototype.inputoTagLine = function ()
|
||||||
{
|
{
|
||||||
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6000,7 +6005,7 @@ ContactModel.prototype.lineAsCcc = function ()
|
||||||
|
|
||||||
return aResult.join(' ');
|
return aResult.join(' ');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number=} iType = Enums.ContactPropertyType.Unknown
|
* @param {number=} iType = Enums.ContactPropertyType.Unknown
|
||||||
* @param {string=} sValue = ''
|
* @param {string=} sValue = ''
|
||||||
|
|
@ -6022,7 +6027,7 @@ function ContactPropertyModel(iType, sValue, bFocused, sPlaceholder)
|
||||||
return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
|
return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6258,7 +6263,7 @@ AttachmentModel.prototype.iconClass = function ()
|
||||||
|
|
||||||
return sClass;
|
return sClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {string} sId
|
* @param {string} sId
|
||||||
|
|
@ -6319,7 +6324,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -6402,11 +6407,16 @@ function MessageModel()
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.body = null;
|
this.body = null;
|
||||||
|
this.plainRaw = '';
|
||||||
this.isRtl = ko.observable(false);
|
this.isRtl = ko.observable(false);
|
||||||
this.isHtml = ko.observable(false);
|
this.isHtml = ko.observable(false);
|
||||||
this.hasImages = ko.observable(false);
|
this.hasImages = ko.observable(false);
|
||||||
this.attachments = ko.observableArray([]);
|
this.attachments = ko.observableArray([]);
|
||||||
|
|
||||||
|
this.isPgpSigned = ko.observable(false);
|
||||||
|
this.isPgpEncrypted = ko.observable(false);
|
||||||
|
this.pgpSignature = ko.observable('');
|
||||||
|
|
||||||
this.priority = ko.observable(Enums.MessagePriority.Normal);
|
this.priority = ko.observable(Enums.MessagePriority.Normal);
|
||||||
this.readReceipt = ko.observable('');
|
this.readReceipt = ko.observable('');
|
||||||
|
|
||||||
|
|
@ -6573,6 +6583,10 @@ MessageModel.prototype.clear = function ()
|
||||||
this.isHtml(false);
|
this.isHtml(false);
|
||||||
this.hasImages(false);
|
this.hasImages(false);
|
||||||
this.attachments([]);
|
this.attachments([]);
|
||||||
|
|
||||||
|
this.isPgpSigned(false);
|
||||||
|
this.isPgpEncrypted(false);
|
||||||
|
this.pgpSignature('');
|
||||||
|
|
||||||
this.priority(Enums.MessagePriority.Normal);
|
this.priority(Enums.MessagePriority.Normal);
|
||||||
this.readReceipt('');
|
this.readReceipt('');
|
||||||
|
|
@ -6667,6 +6681,13 @@ MessageModel.prototype.initUpdateByMessageJson = function (oJsonMessage)
|
||||||
this.sInReplyTo = oJsonMessage.InReplyTo;
|
this.sInReplyTo = oJsonMessage.InReplyTo;
|
||||||
this.sReferences = oJsonMessage.References;
|
this.sReferences = oJsonMessage.References;
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP)
|
||||||
|
{
|
||||||
|
this.isPgpSigned(!!oJsonMessage.PgpSigned);
|
||||||
|
this.isPgpEncrypted(!!oJsonMessage.PgpEncrypted);
|
||||||
|
this.pgpSignature(oJsonMessage.PgpSignature);
|
||||||
|
}
|
||||||
|
|
||||||
this.hasAttachments(!!oJsonMessage.HasAttachments);
|
this.hasAttachments(!!oJsonMessage.HasAttachments);
|
||||||
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
|
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
|
||||||
|
|
||||||
|
|
@ -7128,6 +7149,10 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
|
||||||
// this.hasImages(false);
|
// this.hasImages(false);
|
||||||
// this.attachments([]);
|
// this.attachments([]);
|
||||||
|
|
||||||
|
// this.isPgpSigned(false);
|
||||||
|
// this.isPgpEncrypted(false);
|
||||||
|
// this.pgpSignature('');
|
||||||
|
|
||||||
this.priority(Enums.MessagePriority.Normal);
|
this.priority(Enums.MessagePriority.Normal);
|
||||||
this.aDraftInfo = [];
|
this.aDraftInfo = [];
|
||||||
this.sMessageId = '';
|
this.sMessageId = '';
|
||||||
|
|
@ -7277,7 +7302,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
|
||||||
Utils.windowResize(500);
|
Utils.windowResize(500);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -7611,7 +7636,7 @@ FolderModel.prototype.printableFullName = function ()
|
||||||
{
|
{
|
||||||
return this.fullName.split(this.delimiter).join(' / ');
|
return this.fullName.split(this.delimiter).join(' / ');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} sEmail
|
* @param {string} sEmail
|
||||||
* @param {boolean=} bCanBeDelete = true
|
* @param {boolean=} bCanBeDelete = true
|
||||||
|
|
@ -7632,7 +7657,7 @@ AccountModel.prototype.email = '';
|
||||||
AccountModel.prototype.changeAccountLink = function ()
|
AccountModel.prototype.changeAccountLink = function ()
|
||||||
{
|
{
|
||||||
return RL.link().change(this.email);
|
return RL.link().change(this.email);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @param {string} sId
|
* @param {string} sId
|
||||||
* @param {string} sEmail
|
* @param {string} sEmail
|
||||||
|
|
@ -7668,7 +7693,7 @@ IdentityModel.prototype.formattedNameForEmail = function ()
|
||||||
var sName = this.name();
|
var sName = this.name();
|
||||||
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -7778,7 +7803,7 @@ PopupsFolderClearViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -7902,7 +7927,7 @@ PopupsFolderCreateViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -8021,7 +8046,7 @@ PopupsFolderSystemViewModel.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -9469,7 +9494,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
|
||||||
this.resizer(!this.resizer());
|
this.resizer(!this.resizer());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10109,7 +10134,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
|
||||||
oItem.checked(false);
|
oItem.checked(false);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10253,7 +10278,7 @@ PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10381,7 +10406,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10543,7 +10568,7 @@ PopupsIdentityViewModel.prototype.onBuild = function ()
|
||||||
return bResult;
|
return bResult;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10617,7 +10642,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
|
||||||
RL.data().mainLanguage(sLang);
|
RL.data().mainLanguage(sLang);
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -10735,7 +10760,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -11007,7 +11032,7 @@ LoginViewModel.prototype.selectLanguage = function ()
|
||||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -11074,7 +11099,7 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
|
||||||
|
|
||||||
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
|
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractSystemDropDownViewModel
|
* @extends AbstractSystemDropDownViewModel
|
||||||
|
|
@ -11086,7 +11111,7 @@ function MailBoxSystemDropDownViewModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractSystemDropDownViewModel
|
* @extends AbstractSystemDropDownViewModel
|
||||||
|
|
@ -11098,7 +11123,7 @@ function SettingsSystemDropDownViewModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -11213,7 +11238,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
|
||||||
kn.showScreenPopup(PopupsContactsViewModel);
|
kn.showScreenPopup(PopupsContactsViewModel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -12127,7 +12152,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
|
||||||
;
|
;
|
||||||
|
|
||||||
return !!oJua;
|
return !!oJua;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -12212,7 +12237,7 @@ function MailBoxMessageViewViewModel()
|
||||||
this.viewDownloadLink = ko.observable('');
|
this.viewDownloadLink = ko.observable('');
|
||||||
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
|
this.viewUserPic = ko.observable(Consts.DataImages.UserDotPic);
|
||||||
this.viewUserPicVisible = ko.observable(false);
|
this.viewUserPicVisible = ko.observable(false);
|
||||||
|
|
||||||
this.message.subscribe(function (oMessage) {
|
this.message.subscribe(function (oMessage) {
|
||||||
|
|
||||||
this.messageActiveDom(null);
|
this.messageActiveDom(null);
|
||||||
|
|
@ -12476,7 +12501,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
|
||||||
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {?} oScreen
|
* @param {?} oScreen
|
||||||
*
|
*
|
||||||
|
|
@ -12503,7 +12528,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
|
||||||
{
|
{
|
||||||
kn.setHash(RL.link().inbox());
|
kn.setHash(RL.link().inbox());
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractViewModel
|
* @extends KnoinAbstractViewModel
|
||||||
|
|
@ -12526,7 +12551,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
|
||||||
{
|
{
|
||||||
kn.setHash(RL.link().inbox());
|
kn.setHash(RL.link().inbox());
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -12680,7 +12705,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
|
||||||
{
|
{
|
||||||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -12718,7 +12743,7 @@ SettingsContacts.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
this.showPassword(false);
|
this.showPassword(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -12784,7 +12809,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -12842,7 +12867,7 @@ SettingsIdentity.prototype.onBuild = function ()
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -12970,7 +12995,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
||||||
});
|
});
|
||||||
|
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -13037,7 +13062,7 @@ function SettingsSocialScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -13101,7 +13126,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
|
||||||
this.passwordUpdateError(true);
|
this.passwordUpdateError(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -13296,7 +13321,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
|
||||||
|
|
||||||
oFolder.subScribed(false);
|
oFolder.subScribed(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -13513,7 +13538,7 @@ SettingsThemes.prototype.initCustomThemeUploader = function ()
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -13582,7 +13607,7 @@ AbstractData.prototype.populateDataOnStart = function()
|
||||||
|
|
||||||
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractData
|
* @extends AbstractData
|
||||||
|
|
@ -14292,6 +14317,10 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
oBody = null,
|
oBody = null,
|
||||||
oTextBody = null,
|
oTextBody = null,
|
||||||
sId = '',
|
sId = '',
|
||||||
|
sPlain = '',
|
||||||
|
bPgpSigned = false,
|
||||||
|
bPgpEncrypted = false,
|
||||||
|
mPgpMessage = null,
|
||||||
oMessagesBodiesDom = this.messagesBodiesDom(),
|
oMessagesBodiesDom = this.messagesBodiesDom(),
|
||||||
oMessage = this.message()
|
oMessage = this.message()
|
||||||
;
|
;
|
||||||
|
|
@ -14330,7 +14359,57 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
else if (Utils.isNormal(oData.Result.Plain) && '' !== oData.Result.Plain)
|
else if (Utils.isNormal(oData.Result.Plain) && '' !== oData.Result.Plain)
|
||||||
{
|
{
|
||||||
bIsHtml = false;
|
bIsHtml = false;
|
||||||
oBody.html(oData.Result.Plain.toString()).addClass('b-text-part plain');
|
sPlain = oData.Result.Plain.toString();
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP && (oMessage.isPgpSigned() || oMessage.isPgpEncrypted()) &&
|
||||||
|
Utils.isNormal(oData.Result.PlainRaw))
|
||||||
|
{
|
||||||
|
bPgpEncrypted = /---BEGIN PGP MESSAGE---/.test(oData.Result.PlainRaw);
|
||||||
|
if (!bPgpEncrypted)
|
||||||
|
{
|
||||||
|
bPgpSigned = /-----BEGIN PGP SIGNED MESSAGE-----/.test(oData.Result.PlainRaw) &&
|
||||||
|
/-----BEGIN PGP SIGNATURE-----/.test(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bPgpSigned && oMessage.isPgpSigned() && oMessage.pgpSignature())
|
||||||
|
{
|
||||||
|
sPlain = '<pre class="b-plain-openpgp signed">' + oData.Result.PlainRaw + '</pre>';
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mPgpMessage = window.openpgp.cleartext.readArmored(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
catch (oExc) {}
|
||||||
|
|
||||||
|
if (mPgpMessage && mPgpMessage.getText)
|
||||||
|
{
|
||||||
|
sPlain = mPgpMessage.getText();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bPgpSigned = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (bPgpEncrypted && oMessage.isPgpEncrypted())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mPgpMessage = window.openpgp.message.readArmored(oData.Result.PlainRaw);
|
||||||
|
}
|
||||||
|
catch (oExc) {}
|
||||||
|
|
||||||
|
sPlain = '<pre class="b-plain-openpgp encrypted">' + oData.Result.PlainRaw + '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bPgpSigned || bPgpEncrypted)
|
||||||
|
{
|
||||||
|
oBody.data('rl-plain-raw', oData.Result.PlainRaw);
|
||||||
|
oBody.data('rl-plain-pgp-encrypted', bPgpEncrypted);
|
||||||
|
oBody.data('rl-plain-pgp-signed', bPgpSigned);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
oBody.html(sPlain).addClass('b-text-part plain');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -14343,15 +14422,19 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
oBody.addClass('rtl-text-part');
|
oBody.addClass('rtl-text-part');
|
||||||
}
|
}
|
||||||
|
|
||||||
oMessagesBodiesDom.append(oBody);
|
|
||||||
|
|
||||||
oBody.data('rl-is-html', bIsHtml);
|
|
||||||
oBody.data('rl-has-images', bHasExternals);
|
|
||||||
|
|
||||||
oMessage.isRtl(!!oBody.data('rl-is-rtl'));
|
|
||||||
oMessage.isHtml(!!oBody.data('rl-is-html'));
|
|
||||||
oMessage.hasImages(!!oBody.data('rl-has-images'));
|
|
||||||
oMessage.body = oBody;
|
oMessage.body = oBody;
|
||||||
|
if (oMessage.body)
|
||||||
|
{
|
||||||
|
oMessagesBodiesDom.append(oMessage.body);
|
||||||
|
|
||||||
|
oMessage.body.data('rl-is-html', bIsHtml);
|
||||||
|
oMessage.body.data('rl-has-images', bHasExternals);
|
||||||
|
|
||||||
|
oMessage.isRtl(!!oMessage.body.data('rl-is-rtl'));
|
||||||
|
oMessage.isHtml(!!oMessage.body.data('rl-is-html'));
|
||||||
|
oMessage.hasImages(!!oMessage.body.data('rl-has-images'));
|
||||||
|
oMessage.plainRaw = Utils.pString(oMessage.body.data('rl-plain-raw'));
|
||||||
|
}
|
||||||
|
|
||||||
if (bHasInternals)
|
if (bHasInternals)
|
||||||
{
|
{
|
||||||
|
|
@ -14367,12 +14450,26 @@ WebMailDataStorage.prototype.setMessage = function (oData, bCached)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
oTextBody.data('rl-cache-count', ++Globals.iMessageBodyCacheCount);
|
|
||||||
|
|
||||||
oMessage.isRtl(!!oTextBody.data('rl-is-rtl'));
|
|
||||||
oMessage.isHtml(!!oTextBody.data('rl-is-html'));
|
|
||||||
oMessage.hasImages(!!oTextBody.data('rl-has-images'));
|
|
||||||
oMessage.body = oTextBody;
|
oMessage.body = oTextBody;
|
||||||
|
if (oMessage.body)
|
||||||
|
{
|
||||||
|
oMessage.body.data('rl-cache-count', ++Globals.iMessageBodyCacheCount);
|
||||||
|
oMessage.isRtl(!!oMessage.body.data('rl-is-rtl'));
|
||||||
|
oMessage.isHtml(!!oMessage.body.data('rl-is-html'));
|
||||||
|
oMessage.hasImages(!!oMessage.body.data('rl-has-images'));
|
||||||
|
oMessage.plainRaw = Utils.pString(oMessage.body.data('rl-plain-raw'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Globals.bAllowOpenPGP && oMessage.body)
|
||||||
|
{
|
||||||
|
oMessage.isPgpSigned(!!oMessage.body.data('rl-plain-pgp-signed'));
|
||||||
|
oMessage.isPgpEncrypted(!!oMessage.body.data('rl-plain-pgp-encrypted'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
oMessage.isPgpSigned(false);
|
||||||
|
oMessage.isPgpEncrypted(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.messageActiveDom(oMessage.body);
|
this.messageActiveDom(oMessage.body);
|
||||||
|
|
@ -14532,7 +14629,7 @@ WebMailDataStorage.prototype.setMessageList = function (oData, bCached)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -14806,7 +14903,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
|
||||||
'Version': sVersion
|
'Version': sVersion
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractAjaxRemoteStorage
|
* @extends AbstractAjaxRemoteStorage
|
||||||
|
|
@ -15506,7 +15603,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
|
||||||
this.defaultRequest(fCallback, 'SocialUsers');
|
this.defaultRequest(fCallback, 'SocialUsers');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|
@ -15572,7 +15669,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
||||||
{
|
{
|
||||||
this.oEmailsPicsHashes = oData;
|
this.oEmailsPicsHashes = oData;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractCacheStorage
|
* @extends AbstractCacheStorage
|
||||||
|
|
@ -15890,7 +15987,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
|
||||||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array} aViewModels
|
* @param {Array} aViewModels
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
@ -16067,7 +16164,7 @@ AbstractSettings.prototype.routes = function ()
|
||||||
['', oRules]
|
['', oRules]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractScreen
|
* @extends KnoinAbstractScreen
|
||||||
|
|
@ -16082,7 +16179,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
|
||||||
LoginScreen.prototype.onShow = function ()
|
LoginScreen.prototype.onShow = function ()
|
||||||
{
|
{
|
||||||
RL.setTitle('');
|
RL.setTitle('');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractScreen
|
* @extends KnoinAbstractScreen
|
||||||
|
|
@ -16247,7 +16344,7 @@ MailBoxScreen.prototype.routes = function ()
|
||||||
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
[/^([^\/]*)$/, {'normalize_': fNormS}]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractSettings
|
* @extends AbstractSettings
|
||||||
|
|
@ -16275,7 +16372,7 @@ SettingsScreen.prototype.onShow = function ()
|
||||||
|
|
||||||
RL.setTitle(this.sSettingsTitle);
|
RL.setTitle(this.sSettingsTitle);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends KnoinAbstractBoot
|
* @extends KnoinAbstractBoot
|
||||||
|
|
@ -16514,6 +16611,7 @@ AbstractApp.prototype.sub = function (sName, fFunc, oContext)
|
||||||
*/
|
*/
|
||||||
AbstractApp.prototype.pub = function (sName, aArgs)
|
AbstractApp.prototype.pub = function (sName, aArgs)
|
||||||
{
|
{
|
||||||
|
Plugins.runHook('rl-pub', [sName, aArgs]);
|
||||||
if (!Utils.isUnd(this.oSubs[sName]))
|
if (!Utils.isUnd(this.oSubs[sName]))
|
||||||
{
|
{
|
||||||
_.each(this.oSubs[sName], function (aItem) {
|
_.each(this.oSubs[sName], function (aItem) {
|
||||||
|
|
@ -16585,7 +16683,7 @@ AbstractApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
ssm.ready();
|
ssm.ready();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends AbstractApp
|
* @extends AbstractApp
|
||||||
|
|
@ -17289,6 +17387,7 @@ RainLoopApp.prototype.mailToHelper = function (sMailToUrl)
|
||||||
|
|
||||||
RainLoopApp.prototype.bootstart = function ()
|
RainLoopApp.prototype.bootstart = function ()
|
||||||
{
|
{
|
||||||
|
RL.pub('rl.bootstart');
|
||||||
AbstractApp.prototype.bootstart.call(this);
|
AbstractApp.prototype.bootstart.call(this);
|
||||||
|
|
||||||
RL.data().populateDataOnStart();
|
RL.data().populateDataOnStart();
|
||||||
|
|
@ -17371,17 +17470,26 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
if (bValue)
|
if (bValue)
|
||||||
{
|
{
|
||||||
// if (window.crypto && window.crypto.getRandomValues)
|
if (window.crypto && window.crypto.getRandomValues && RL.settingsGet('OpenPGP'))
|
||||||
// {
|
{
|
||||||
// $.ajax({
|
$.ajax({
|
||||||
// 'url': RL.link().openPgpJs(),
|
'url': RL.link().openPgpJs(),
|
||||||
// 'dataType': 'script',
|
'dataType': 'script',
|
||||||
// 'cache': true,
|
'cache': true,
|
||||||
// 'success': function () {
|
'success': function () {
|
||||||
// window.console.log('openPgpJs');
|
if (window.openpgp)
|
||||||
// }
|
{
|
||||||
// });
|
// window.console.log(window.openpgp);
|
||||||
// }
|
Globals.bAllowOpenPGP = true;
|
||||||
|
RL.pub('openpgp.init');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Globals.bAllowOpenPGP = false;
|
||||||
|
}
|
||||||
|
|
||||||
kn.startScreens([MailBoxScreen, SettingsScreen]);
|
kn.startScreens([MailBoxScreen, SettingsScreen]);
|
||||||
|
|
||||||
|
|
@ -17432,13 +17540,15 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
|
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
|
||||||
Plugins.runHook('rl-start-user-screens');
|
Plugins.runHook('rl-start-user-screens');
|
||||||
|
RL.pub('rl.bootstart-user-screens');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
kn.startScreens([LoginScreen]);
|
kn.startScreens([LoginScreen]);
|
||||||
|
|
||||||
Plugins.runHook('rl-start-login-screens');
|
Plugins.runHook('rl-start-login-screens');
|
||||||
|
RL.pub('rl.bootstart-login-screens');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (window.SimplePace)
|
||||||
|
|
@ -17464,6 +17574,7 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
kn.startScreens([LoginScreen]);
|
kn.startScreens([LoginScreen]);
|
||||||
|
|
||||||
Plugins.runHook('rl-start-login-screens');
|
Plugins.runHook('rl-start-login-screens');
|
||||||
|
RL.pub('rl.bootstart-login-screens');
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (window.SimplePace)
|
||||||
{
|
{
|
||||||
|
|
@ -17511,13 +17622,14 @@ RainLoopApp.prototype.bootstart = function ()
|
||||||
});
|
});
|
||||||
|
|
||||||
Plugins.runHook('rl-start-screens');
|
Plugins.runHook('rl-start-screens');
|
||||||
|
RL.pub('rl.bootstart-end');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {RainLoopApp}
|
* @type {RainLoopApp}
|
||||||
*/
|
*/
|
||||||
RL = new RainLoopApp();
|
RL = new RainLoopApp();
|
||||||
|
|
||||||
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
|
||||||
|
|
||||||
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
|
||||||
|
|
@ -17564,9 +17676,9 @@ window['__RLBOOT'] = function (fCall) {
|
||||||
window['__RLBOOT'] = null;
|
window['__RLBOOT'] = null;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.SimplePace) {
|
if (window.SimplePace) {
|
||||||
window.SimplePace.add(10);
|
window.SimplePace.add(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible));
|
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible));
|
||||||
16
rainloop/v/0.0.0/static/js/app.min.js
vendored
16
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
/*! See http://www.JSON.org/js.html */
|
/*! See http://www.JSON.org/js.html */
|
||||||
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
|
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
|
||||||
/*! RainLoop Simple Pace v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
/*! RainLoop Simple Pace v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||||
!function(a){function b(){var b=this;b.el=null,b.done=!1,b.progress=0,b.addInterval=0,b.addSpeed=3,b.stopProgress=100,b.interval=a.setInterval(function(){var c=b.build();c&&a.clearInterval(b.interval)},100)}if(b.prototype.startAddInterval=function(){var b=this;b.stopAddInterval(),b.addInterval=a.setInterval(function(){0<b.progress&&b.stopProgress>b.progress&&b.add(b.addSpeed)},500)},b.prototype.stopAddInterval=function(){a.clearInterval(this.addInterval),this.addInterval=0},b.prototype.build=function(){if(null===this.el){var a=document.querySelector("body");a&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el))}return this.el},b.prototype.reset=function(){return this.progress=0,this.render()},b.prototype.update=function(b){var c=a.parseInt(b,10);return c>this.progress&&(this.progress=c,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},b.prototype.add=function(b){return this.progress+=a.parseInt(b,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},b.prototype.setSpeed=function(a,b){this.addSpeed=a,this.stopProgress=b||100},b.prototype.render=function(){var b=this.build();b&&b.children&&b.children[0]&&b.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),b.className=b.className.replace("simple-pace-inactive",""),b.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),a.setTimeout(function(){b.className=b.className.replace("simple-pace-active",""),b.className+=" simple-pace-inactive"},500))},!a.SimplePace){var c=new b;a.SimplePace={sleep:function(){c.setSpeed(2,95)},set:function(a){c.update(a)},add:function(a){c.add(a)}}}}(window);
|
!function(a){function b(){var b=this;b.el=null,b.done=!1,b.progress=0,b.addInterval=0,b.addSpeed=3,b.stopProgress=100,b.interval=a.setInterval(function(){var c=b.build();c&&a.clearInterval(b.interval)},100)}if(b.prototype.startAddInterval=function(){var b=this;b.stopAddInterval(),b.addInterval=a.setInterval(function(){0<b.progress&&b.stopProgress>b.progress&&b.add(b.addSpeed)},500)},b.prototype.stopAddInterval=function(){a.clearInterval(this.addInterval),this.addInterval=0},b.prototype.build=function(){if(null===this.el){var a=document.querySelector("body");a&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el))}return this.el},b.prototype.reset=function(){return this.progress=0,this.render()},b.prototype.update=function(b){var c=a.parseInt(b,10);return c>this.progress&&(this.progress=c,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress),this.render()},b.prototype.add=function(b){return this.progress+=a.parseInt(b,10),this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress,this.render()},b.prototype.setSpeed=function(a,b){this.addSpeed=a,this.stopProgress=b||100},b.prototype.render=function(){var b=this.build();b&&b.children&&b.children[0]&&b.children[0].setAttribute("style","width:"+this.progress+"%"),100!==this.progress||this.done?100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),b.className=b.className.replace("simple-pace-inactive",""),b.className+=" simple-pace-inactive"):100>this.progress&&!this.done&&0===this.addInterval&&this.startAddInterval():(this.done=!0,this.stopAddInterval(),a.setTimeout(function(){b.className=b.className.replace("simple-pace-active",""),b.className+=" simple-pace-inactive"},500))},!a.SimplePace){var c=new b;a.SimplePace={sleep:function(){c.setSpeed(2,95)},set:function(a){c.update(a)},add:function(a){c.add(a)}}}}(window);
|
||||||
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
/*! RainLoop Top Driver v1.0 (c) 2013 RainLoop Team; Licensed under MIT */
|
||||||
!function(a,b){function c(){}c.prototype.s=a.sessionStorage,c.prototype.t=a.top||a,c.prototype.getHash=function(){var a=null;if(this.s)a=this.s.getItem("__rlA")||null;else if(this.t){var c=this.t.name&&b&&"{"===this.t.name.toString().substr(0,1)?b.parse(this.t.name.toString()):null;a=c?c.__rlA||null:null}return a},c.prototype.setHash=function(){var c=a.rainloopAppData,d=null;this.s?this.s.setItem("__rlA",c&&c.AuthAccountHash?c.AuthAccountHash:""):this.t&&b&&(d={},d.__rlA=c&&c.AuthAccountHash?c.AuthAccountHash:"",this.t.name=b.stringify(d))},c.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},a._rlhh=new c,a.__rlah=function(){return a._rlhh?a._rlhh.getHash():null},a.__rlah_set=function(){a._rlhh&&a._rlhh.setHash()},a.__rlah_clear=function(){a._rlhh&&a._rlhh.clearHash()}}(window,window.JSON);
|
!function(a,b){function c(){}c.prototype.s=a.sessionStorage,c.prototype.t=a.top||a,c.prototype.getHash=function(){var a=null;if(this.s)a=this.s.getItem("__rlA")||null;else if(this.t){var c=this.t.name&&b&&"{"===this.t.name.toString().substr(0,1)?b.parse(this.t.name.toString()):null;a=c?c.__rlA||null:null}return a},c.prototype.setHash=function(){var c=a.rainloopAppData,d=null;this.s?this.s.setItem("__rlA",c&&c.AuthAccountHash?c.AuthAccountHash:""):this.t&&b&&(d={},d.__rlA=c&&c.AuthAccountHash?c.AuthAccountHash:"",this.t.name=b.stringify(d))},c.prototype.clearHash=function(){this.s?this.s.setItem("__rlA",""):this.t&&(this.t.name="")},a._rlhh=new c,a.__rlah=function(){return a._rlhh?a._rlhh.getHash():null},a.__rlah_set=function(){a._rlhh&&a._rlhh.setHash()},a.__rlah_clear=function(){a._rlhh&&a._rlhh.clearHash()}}(window,window.JSON);
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue