OpenPGP (Compose) (#53) UNSTABLE

This commit is contained in:
RainLoop Team 2014-03-21 03:47:13 +04:00
parent b330f77bc0
commit 1c4ce1dfb2
14 changed files with 631 additions and 321 deletions

View file

@ -328,6 +328,7 @@ RainLoopApp.prototype.reloadOpenPgpKeys = function ()
{
var
aKeys = [],
oEmail = new EmailModel(),
oOpenpgpKeyring = RL.data().openpgpKeyring,
oOpenpgpKeys = oOpenpgpKeyring ? oOpenpgpKeyring.keys : []
;
@ -335,20 +336,28 @@ RainLoopApp.prototype.reloadOpenPgpKeys = function ()
_.each(oOpenpgpKeys, function (oItem, iIndex) {
if (oItem && oItem.primaryKey)
{
var
var
oPrimaryUser = oItem.getPrimaryUser(),
sUser = (oPrimaryUser && oPrimaryUser.user) ? oPrimaryUser.user.userId.userid
: (oItem.users && oItem.users[0] ? oItem.users[0].userId.userid : '')
;
aKeys.push(new OpenPgpKeyModel(
iIndex,
oItem.primaryKey.getFingerprint(),
oItem.primaryKey.getKeyId().toHex().toLowerCase(),
sUser,
oItem.isPrivate(),
oItem.armor())
);
oEmail.clear();
oEmail.mailsoParse(sUser);
if (oEmail.validate())
{
aKeys.push(new OpenPgpKeyModel(
iIndex,
oItem.primaryKey.getFingerprint(),
oItem.primaryKey.getKeyId().toHex().toLowerCase(),
sUser,
oEmail.email,
oItem.isPrivate(),
oItem.armor())
);
}
}
});

View file

@ -182,6 +182,7 @@ NewHtmlEditorWrapper.prototype.init = function ()
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65/* A */, 'selectAll');
self.fOnReady();
self.__resizable = true;
self.resize();
});
}
@ -206,7 +207,7 @@ NewHtmlEditorWrapper.prototype.blur = function ()
NewHtmlEditorWrapper.prototype.resize = function ()
{
if (this.editor)
if (this.editor && this.__resizable)
{
this.editor.resize(this.$element.width(), this.$element.innerHeight());
}

View file

@ -5,16 +5,18 @@
* @param {string} sGuID
* @param {string} sID
* @param {string} sUserID
* @param {string} sEmail
* @param {boolean} bIsPrivate
* @param {string} sArmor
* @constructor
*/
function OpenPgpKeyModel(iIndex, sGuID, sID, sUserID, bIsPrivate, sArmor)
function OpenPgpKeyModel(iIndex, sGuID, sID, sUserID, sEmail, bIsPrivate, sArmor)
{
this.index = iIndex;
this.id = sID;
this.guid = sGuID;
this.user = sUserID;
this.email = sEmail;
this.armor = sArmor;
this.isPrivate = !!bIsPrivate;
@ -25,5 +27,6 @@ OpenPgpKeyModel.prototype.index = 0;
OpenPgpKeyModel.prototype.id = '';
OpenPgpKeyModel.prototype.guid = '';
OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false;

View file

@ -6,18 +6,8 @@
function SettingsOpenPGP()
{
this.openpgpkeys = RL.data().openpgpkeys;
this.openpgpkeysPublic = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && !oItem.isPrivate);
});
}, this);
this.openpgpkeysPrivate = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && oItem.isPrivate);
});
}, this);
this.openpgpkeysPublic = RL.data().openpgpkeysPublic;
this.openpgpkeysPrivate = RL.data().openpgpkeysPrivate;
this.openPgpKeyForDeletion = ko.observable(null).extend({'falseTimeout': 3000}).extend({'toggleSubscribe': [this,
function (oPrev) {

View file

@ -98,7 +98,6 @@ function WebMailDataStorage()
return bLoading || bCreating || bDeleting || bRenaming;
}, this);
this.foldersInboxUnreadCount = ko.observable(0);
this.currentFolder = ko.observable(null).extend({'toggleSubscribe': [null,
@ -348,6 +347,18 @@ function WebMailDataStorage()
this.openpgpkeys = ko.observableArray([]);
this.openpgpKeyring = null;
this.openpgpkeysPublic = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && !oItem.isPrivate);
});
}, this);
this.openpgpkeysPrivate = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && oItem.isPrivate);
});
}, this);
// google
this.googleActions = ko.observable(false);
this.googleLoggined = ko.observable(false);
@ -716,7 +727,6 @@ WebMailDataStorage.prototype.getNextFolderNames = function (bBoot)
};
/**
* @param {Function} fCallback
* @param {string} sFromFolderFullNameRaw
* @param {Array} aUidForRemove
* @param {string=} sToFolderFullNameRaw = ''

View file

@ -16,13 +16,168 @@ function PopupsComposeOpenPgpViewModel()
this.password = ko.observable('');
this.password.focus = ko.observable(true);
this.from = ko.observable('');
this.to = ko.observableArray([]);
this.text = ko.observable('');
this.resultCallback = null;
this.submitRequest = ko.observable(false);
// commands
this.doCommand = Utils.createCommand(this, function () {
this.cancelCommand();
var
self = this,
bResult = true,
aOpenpgpkeysPublic = RL.data().openpgpkeysPublic(),
oKey = null,
oPrivateKey = null,
aPublicKeys = [],
fFindPublicKey = function (sEmail) {
var
oResult = null,
oKey = _.find(aOpenpgpkeysPublic, function (oItem) {
return oItem && sEmail === oItem.email;
})
;
if (oKey)
{
try
{
oResult = window.openpgp.key.readArmored(oKey.armor);
if (oResult && !oResult.err && oResult.keys && oResult.keys[0])
{
oResult = oResult.keys[0];
}
else
{
oResult = null;
}
}
catch (e)
{
oResult = null;
}
}
return oResult;
}
;
this.submitRequest(true);
if (bResult && this.sign() && '' === this.from())
{
this.notification('Please specify From email address');
bResult = false;
}
if (bResult && this.sign())
{
oKey = _.find(RL.data().openpgpkeysPrivate(), function (oItem) {
return oItem && self.from() === oItem.email;
});
if (oKey)
{
try
{
oPrivateKey = window.openpgp.key.readArmored(oKey.armor);
if (oPrivateKey && !oPrivateKey.err && oPrivateKey.keys && oPrivateKey.keys[0])
{
oPrivateKey = oPrivateKey.keys[0];
oPrivateKey.decrypt(this.password());
}
else
{
oPrivateKey = null;
}
}
catch (e)
{
oPrivateKey = null;
}
}
if (!oPrivateKey)
{
this.notification('No private key found for "' + this.from() + '" email');
bResult = false;
}
}
if (bResult && this.encrypt() && 0 === this.to().length)
{
this.notification('Please specify at least one recipient');
bResult = false;
}
if (bResult && this.encrypt())
{
aPublicKeys = _.compact(_.map(this.to(), function (sEmail) {
var oKey = fFindPublicKey(sEmail);
if (!oKey && bResult)
{
self.notification('No public key found for "' + sEmail + '" email');
bResult = false;
}
return oKey;
}));
if (0 === aPublicKeys.length || this.to().length !== aPublicKeys.length)
{
bResult = false;
}
}
_.delay(function () {
if (self.resultCallback && bResult)
{
try {
if (oPrivateKey && 0 === aPublicKeys.length)
{
self.resultCallback(
window.openpgp.signClearMessage([oPrivateKey], self.text())
);
}
else if (oPrivateKey && 0 < aPublicKeys.length)
{
self.resultCallback(
window.openpgp.signAndEncryptMessage(aPublicKeys, oPrivateKey, self.text())
);
}
else if (!oPrivateKey && 0 < aPublicKeys.length)
{
self.resultCallback(
window.openpgp.encryptMessage(aPublicKeys, self.text())
);
}
}
catch (e)
{
self.notification('OpenPGP error: ' + e);
bResult = false;
}
}
if (bResult)
{
self.cancelCommand();
}
self.submitRequest(false);
}, 10);
}, function () {
return '' === this.notification();
return !this.submitRequest() && (this.sign() || this.encrypt());
});
Knoin.constructorEnd(this);
@ -36,6 +191,14 @@ PopupsComposeOpenPgpViewModel.prototype.clearPopup = function ()
this.password('');
this.password.focus(false);
this.from('');
this.to([]);
this.text('');
this.submitRequest(false);
this.resultCallback = null;
};
PopupsComposeOpenPgpViewModel.prototype.onHide = function ()
@ -53,20 +216,11 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
aRec = []
;
if ('' === sTo + sCc + sBcc)
{
this.notification('Please specify at least one recipient');
return false;
}
this.resultCallback = fCallback;
oEmail.clear();
oEmail.mailsoParse(sFromEmail);
if ('' === oEmail.email)
{
this.notification('Please specify From email address');
return false;
}
else
if ('' !== oEmail.email)
{
sResultFromEmail = oEmail.email;
}
@ -93,22 +247,7 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
return '' === oEmail.email ? false : oEmail.email;
}));
if (0 === aRec.length)
{
this.notification('Please specify at least one recipient');
return false;
}
window.console.log(sResultFromEmail);
window.console.log(aRec);
// TODO
};
PopupsComposeOpenPgpViewModel.prototype.onFocus = function ()
{
if (this.sign())
{
this.password.focus(true);
}
this.from(sResultFromEmail);
this.to(aRec);
this.text(sText);
};

View file

@ -362,9 +362,12 @@ PopupsComposeViewModel.prototype.openOpenPgpPopup = function ()
{
if (this.allowOpenPGP() && this.oEditor && !this.oEditor.isHtml())
{
var self = this;
kn.showScreenPopup(PopupsComposeOpenPgpViewModel, [
function () {
function (sResult) {
self.editor(function (oEditor) {
oEditor.setPlain(sResult);
});
},
this.oEditor.getData(),
this.currentIdentityResultEmail(),

View file

@ -36,7 +36,7 @@
</div>
<div class="modal-footer">
<a class="btn buttonDo" data-bind="command: doCommand">
<i class="icon-key"></i>
<i data-bind="css: {'icon-key': !submitRequest(), 'icon-spinner animated': submitRequest()}"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="POPUPS_COMPOSE_OPEN_PGP/BUTTON_DO"></span>
</a>

View file

@ -637,7 +637,7 @@
border-radius: 8px;
}
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* =============================================================================
@ -1142,7 +1142,7 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
@charset "UTF-8";
@font-face {
@ -1474,7 +1474,7 @@ table {
.icon-mail:before {
content: "\e062";
}
/** initial setup **/
.nano {
/*
@ -1591,7 +1591,7 @@ table {
.nano > .pane2:hover > .slider2, .nano > .pane2.active > .slider2 {
background-color: rgba(0, 0, 0, 0.4);
}
/* Magnific Popup CSS */
.mfp-bg {
top: 0;
@ -1956,7 +1956,7 @@ img.mfp-img {
right: 0;
padding-top: 0; }
/* overlay at start */
.mfp-fade.mfp-bg {
@ -2002,7 +2002,7 @@ img.mfp-img {
-moz-transform: translateX(50px);
transform: translateX(50px);
}
.simple-pace {
-webkit-pointer-events: none;
pointer-events: none;
@ -2073,7 +2073,7 @@ img.mfp-img {
@keyframes simple-pace-stripe-animation {
0% { transform: none; transform: none; }
100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
}
}
.inputosaurus-container {
background-color:#fff;
border:1px solid #bcbec0;
@ -2141,7 +2141,7 @@ img.mfp-img {
box-shadow:none;
}
.inputosaurus-input-hidden { display:none; }
.flag-wrapper {
width: 24px;
height: 16px;
@ -2184,7 +2184,7 @@ img.mfp-img {
.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}
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
.clearfix {
*zoom: 1;

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
/*! RainLoop Webmail Admin Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, _) {
'use strict';
@ -70,14 +70,14 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?AdminApp}
*/
var RL = null;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -221,7 +221,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -339,7 +339,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -683,7 +683,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -2445,7 +2445,7 @@ Utils.openPgpImportPublicKeys = function (sPublicKeysArmored)
return false;
};
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2608,7 +2608,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -3257,7 +3257,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3555,7 +3555,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3649,7 +3649,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
/**
* @constructor
*/
@ -3723,7 +3723,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -3794,7 +3794,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -3837,7 +3837,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -3850,7 +3850,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -3925,7 +3925,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
return true;
});
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -4001,7 +4001,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -4387,7 +4387,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -4751,7 +4751,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -4969,7 +4969,7 @@ PopupsDomainViewModel.prototype.clearForm = function ()
this.smtpAuth(true);
this.whiteList('');
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5108,7 +5108,7 @@ PopupsPluginViewModel.prototype.onBuild = function ()
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5224,7 +5224,7 @@ PopupsActivateViewModel.prototype.validateSubscriptionKey = function ()
{
var sValue = this.key();
return '' === sValue || !!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(Utils.trim(sValue));
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5284,7 +5284,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5404,7 +5404,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5491,7 +5491,7 @@ AdminLoginViewModel.prototype.onHide = function ()
{
this.loginFocus(false);
};
/**
* @param {?} oScreen
*
@ -5513,7 +5513,7 @@ AdminMenuViewModel.prototype.link = function (sRoute)
{
return '#/' + sRoute;
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5535,7 +5535,7 @@ AdminPaneViewModel.prototype.logoutClick = function ()
RL.remote().adminLogout(function () {
RL.loginAndLogoutReload();
});
};
};
/**
* @constructor
*/
@ -5635,7 +5635,7 @@ AdminGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -5687,7 +5687,7 @@ AdminLogin.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -5756,7 +5756,7 @@ AdminBranding.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -5976,7 +5976,7 @@ AdminContacts.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6065,7 +6065,7 @@ AdminDomains.prototype.onDomainListChangeRequest = function ()
{
RL.reloadDomainList();
};
/**
* @constructor
*/
@ -6153,7 +6153,7 @@ AdminSecurity.prototype.phpInfoLink = function ()
{
return RL.link().phpInfo();
};
/**
* @constructor
*/
@ -6269,7 +6269,7 @@ AdminSocial.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -6366,7 +6366,7 @@ AdminPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
RL.reloadPluginList();
};
/**
* @constructor
*/
@ -6470,7 +6470,7 @@ AdminPackages.prototype.installPackage = function (oPackage)
RL.remote().packageInstall(this.requestHelper(oPackage, true), oPackage);
}
};
/**
* @constructor
*/
@ -6521,7 +6521,7 @@ AdminLicensing.prototype.licenseExpiredMomentValue = function ()
{
var oDate = moment.unix(this.licenseExpired());
return oDate.format('LL') + ' (' + oDate.from(moment()) + ')';
};
};
/**
* @constructor
*/
@ -6596,7 +6596,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -6630,7 +6630,7 @@ _.extend(AdminDataStorage.prototype, AbstractData.prototype);
AdminDataStorage.prototype.populateDataOnStart = function()
{
AbstractData.prototype.populateDataOnStart.call(this);
};
};
/**
* @constructor
*/
@ -6904,7 +6904,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -7148,7 +7148,7 @@ AdminAjaxRemoteStorage.prototype.adminPing = function (fCallback)
{
this.defaultRequest(fCallback, 'AdminPing');
};
/**
* @constructor
*/
@ -7214,7 +7214,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -7225,7 +7225,7 @@ function AdminCacheStorage()
}
_.extend(AdminCacheStorage.prototype, AbstractCacheStorage.prototype);
/**
* @param {Array} aViewModels
* @constructor
@ -7403,7 +7403,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -7418,7 +7418,7 @@ _.extend(AdminLoginScreen.prototype, KnoinAbstractScreen.prototype);
AdminLoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends AbstractSettings
@ -7438,7 +7438,7 @@ AdminSettingsScreen.prototype.onShow = function ()
// AbstractSettings.prototype.onShow.call(this);
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -7758,7 +7758,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/**
* @constructor
* @extends AbstractApp
@ -7997,7 +7997,7 @@ AdminApp.prototype.bootstart = function ()
* @type {AdminApp}
*/
RL = new AdminApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -8044,9 +8044,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, _));

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
/*! RainLoop Webmail Main Module (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (window, $, ko, crossroads, hasher, moment, Jua, _, ifvisible) {
'use strict';
@ -70,14 +70,14 @@ var
$document = $(window.document),
NotificationClass = window.Notification && window.Notification.requestPermission ? window.Notification : null
;
;
/*jshint onevar: false*/
/**
* @type {?RainLoopApp}
*/
var RL = null;
/*jshint onevar: true*/
/**
* @type {?}
*/
@ -221,7 +221,7 @@ if (Globals.bAllowPdfPreview && navigator && navigator.mimeTypes)
return oType && 'application/pdf' === oType.type;
});
}
Consts.Defaults = {};
Consts.Values = {};
Consts.DataImages = {};
@ -339,7 +339,7 @@ Consts.DataImages.UserDotPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA
* @type {string}
*/
Consts.DataImages.TranspPic = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=';
/**
* @enum {string}
*/
@ -683,7 +683,7 @@ Enums.Notification = {
'UnknownNotification': 999,
'UnknownError': 999
};
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -2445,7 +2445,7 @@ Utils.openPgpImportPublicKeys = function (sPublicKeysArmored)
return false;
};
// Base64 encode / decode
// http://www.webtoolkit.info/
@ -2608,7 +2608,7 @@ Base64 = {
}
};
/*jslint bitwise: false*/
/*jslint bitwise: false*/
ko.bindingHandlers.tooltip = {
'init': function (oElement, fValueAccessor) {
if (!Globals.bMobileDevice)
@ -3257,7 +3257,7 @@ ko.observable.fn.validateFunc = function (fFunc)
return this;
};
/**
* @constructor
*/
@ -3555,7 +3555,7 @@ LinkBuilder.prototype.socialFacebook = function ()
{
return this.sServer + 'SocialFacebook' + ('' !== this.sSpecSuffix ? '/' + this.sSpecSuffix + '/' : '');
};
/**
* @type {Object}
*/
@ -3649,7 +3649,7 @@ Plugins.settingsGet = function (sPluginSection, sName)
};
function NewHtmlEditorWrapper(oElement, fOnBlur, fOnReady, fOnModeChange)
{
var self = this;
@ -3826,6 +3826,7 @@ NewHtmlEditorWrapper.prototype.init = function ()
self.editor.setKeystroke(window.CKEDITOR.CTRL + 65/* A */, 'selectAll');
self.fOnReady();
self.__resizable = true;
self.resize();
});
}
@ -3850,7 +3851,7 @@ NewHtmlEditorWrapper.prototype.blur = function ()
NewHtmlEditorWrapper.prototype.resize = function ()
{
if (this.editor)
if (this.editor && this.__resizable)
{
this.editor.resize(this.$element.width(), this.$element.innerHeight());
}
@ -3861,7 +3862,7 @@ NewHtmlEditorWrapper.prototype.clear = function (bFocus)
this.setHtml('', bFocus);
};
/**
* @constructor
* @param {koProperty} oKoList
@ -4402,7 +4403,7 @@ Selector.prototype.on = function (sEventName, fCallback)
{
this.oCallbacks[sEventName] = fCallback;
};
/**
* @constructor
*/
@ -4476,7 +4477,7 @@ CookieDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4547,7 +4548,7 @@ LocalStorageDriver.prototype.get = function (sKey)
return mResult;
};
/**
* @constructor
*/
@ -4606,7 +4607,7 @@ OpenPgpLocalStorageDriver.prototype.store = function (aKeys)
window.localStorage.setItem(this.item, JSON.stringify(aArmoredKeys));
};
/**
* @constructor
*/
@ -4649,7 +4650,7 @@ LocalStorage.prototype.get = function (iKey)
{
return this.oDriver ? this.oDriver.get('p' + iKey) : null;
};
/**
* @constructor
*/
@ -4662,7 +4663,7 @@ KnoinAbstractBoot.prototype.bootstart = function ()
{
};
/**
* @param {string=} sPosition = ''
* @param {string=} sTemplate = ''
@ -4737,7 +4738,7 @@ KnoinAbstractViewModel.prototype.registerPopupEscapeKey = function ()
return true;
});
};
/**
* @param {string} sScreenName
* @param {?=} aViewModels = []
@ -4813,7 +4814,7 @@ KnoinAbstractScreen.prototype.__start = function ()
this.oCross = oRoute;
}
};
/**
* @constructor
*/
@ -5199,7 +5200,7 @@ Knoin.prototype.bootstart = function ()
};
kn = new Knoin();
/**
* @param {string=} sEmail
* @param {string=} sName
@ -5563,7 +5564,7 @@ EmailModel.prototype.inputoTagLine = function ()
{
return 0 < this.name.length ? this.name + ' (' + this.email + ')' : this.email;
};
/**
* @constructor
*/
@ -5685,7 +5686,7 @@ ContactModel.prototype.lineAsCcc = function ()
return aResult.join(' ');
};
/**
* @param {number=} iType = Enums.ContactPropertyType.Unknown
* @param {string=} sValue = ''
@ -5707,7 +5708,7 @@ function ContactPropertyModel(iType, sValue, bFocused, sPlaceholder)
return sPlaceholder ? Utils.i18n(sPlaceholder) : '';
}, this);
}
/**
* @constructor
*/
@ -5943,7 +5944,7 @@ AttachmentModel.prototype.iconClass = function ()
return sClass;
};
/**
* @constructor
* @param {string} sId
@ -6004,7 +6005,7 @@ ComposeAttachmentModel.prototype.initByUploadJson = function (oJsonAttachment)
}
return bResult;
};
};
/**
* @constructor
*/
@ -6986,7 +6987,7 @@ MessageModel.prototype.showInternalImages = function (bLazy)
Utils.windowResize(500);
}
};
/**
* @constructor
*/
@ -7320,7 +7321,7 @@ FolderModel.prototype.printableFullName = function ()
{
return this.fullName.split(this.delimiter).join(' / ');
};
/**
* @param {string} sEmail
* @param {boolean=} bCanBeDelete = true
@ -7341,7 +7342,7 @@ AccountModel.prototype.email = '';
AccountModel.prototype.changeAccountLink = function ()
{
return RL.link().change(this.email);
};
};
/**
* @param {string} sId
* @param {string} sEmail
@ -7377,22 +7378,24 @@ IdentityModel.prototype.formattedNameForEmail = function ()
var sName = this.name();
return '' === sName ? this.email() : '"' + Utils.quoteName(sName) + '" <' + this.email() + '>';
};
/**
* @param {string} iIndex
* @param {string} sGuID
* @param {string} sID
* @param {string} sUserID
* @param {string} sEmail
* @param {boolean} bIsPrivate
* @param {string} sArmor
* @constructor
*/
function OpenPgpKeyModel(iIndex, sGuID, sID, sUserID, bIsPrivate, sArmor)
function OpenPgpKeyModel(iIndex, sGuID, sID, sUserID, sEmail, bIsPrivate, sArmor)
{
this.index = iIndex;
this.id = sID;
this.guid = sGuID;
this.user = sUserID;
this.email = sEmail;
this.armor = sArmor;
this.isPrivate = !!bIsPrivate;
@ -7403,9 +7406,10 @@ OpenPgpKeyModel.prototype.index = 0;
OpenPgpKeyModel.prototype.id = '';
OpenPgpKeyModel.prototype.guid = '';
OpenPgpKeyModel.prototype.user = '';
OpenPgpKeyModel.prototype.email = '';
OpenPgpKeyModel.prototype.armor = '';
OpenPgpKeyModel.prototype.isPrivate = false;
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7501,7 +7505,7 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7611,7 +7615,7 @@ PopupsFolderCreateViewModel.prototype.onFocus = function ()
{
this.folderName.focused(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -7716,7 +7720,7 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -8079,9 +8083,12 @@ PopupsComposeViewModel.prototype.openOpenPgpPopup = function ()
{
if (this.allowOpenPGP() && this.oEditor && !this.oEditor.isHtml())
{
var self = this;
kn.showScreenPopup(PopupsComposeOpenPgpViewModel, [
function () {
function (sResult) {
self.editor(function (oEditor) {
oEditor.setPlain(sResult);
});
},
this.oEditor.getData(),
this.currentIdentityResultEmail(),
@ -9201,7 +9208,7 @@ PopupsComposeViewModel.prototype.triggerForResize = function ()
this.editorResizeThrottle();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -9822,7 +9829,7 @@ PopupsContactsViewModel.prototype.onHide = function ()
oItem.checked(false);
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -9952,7 +9959,7 @@ PopupsAdvancedSearchViewModel.prototype.onFocus = function ()
{
this.fromFocus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10069,7 +10076,7 @@ PopupsAddAccountViewModel.prototype.onBuild = function ()
{
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10129,7 +10136,7 @@ PopupsAddOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.key.focus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10169,7 +10176,7 @@ PopupsViewOpenPgpKeyViewModel.prototype.onShow = function (oOpenPgpKey)
this.key(oOpenPgpKey.armor);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10257,7 +10264,7 @@ PopupsGenerateNewOpenPgpKeyViewModel.prototype.onFocus = function ()
{
this.email.focus(true);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10274,13 +10281,168 @@ function PopupsComposeOpenPgpViewModel()
this.password = ko.observable('');
this.password.focus = ko.observable(true);
this.from = ko.observable('');
this.to = ko.observableArray([]);
this.text = ko.observable('');
this.resultCallback = null;
this.submitRequest = ko.observable(false);
// commands
this.doCommand = Utils.createCommand(this, function () {
this.cancelCommand();
var
self = this,
bResult = true,
aOpenpgpkeysPublic = RL.data().openpgpkeysPublic(),
oKey = null,
oPrivateKey = null,
aPublicKeys = [],
fFindPublicKey = function (sEmail) {
var
oResult = null,
oKey = _.find(aOpenpgpkeysPublic, function (oItem) {
return oItem && sEmail === oItem.email;
})
;
if (oKey)
{
try
{
oResult = window.openpgp.key.readArmored(oKey.armor);
if (oResult && !oResult.err && oResult.keys && oResult.keys[0])
{
oResult = oResult.keys[0];
}
else
{
oResult = null;
}
}
catch (e)
{
oResult = null;
}
}
return oResult;
}
;
this.submitRequest(true);
if (bResult && this.sign() && '' === this.from())
{
this.notification('Please specify From email address');
bResult = false;
}
if (bResult && this.sign())
{
oKey = _.find(RL.data().openpgpkeysPrivate(), function (oItem) {
return oItem && self.from() === oItem.email;
});
if (oKey)
{
try
{
oPrivateKey = window.openpgp.key.readArmored(oKey.armor);
if (oPrivateKey && !oPrivateKey.err && oPrivateKey.keys && oPrivateKey.keys[0])
{
oPrivateKey = oPrivateKey.keys[0];
oPrivateKey.decrypt(this.password());
}
else
{
oPrivateKey = null;
}
}
catch (e)
{
oPrivateKey = null;
}
}
if (!oPrivateKey)
{
this.notification('No private key found for "' + this.from() + '" email!');
bResult = false;
}
}
if (bResult && this.encrypt() && 0 === this.to().length)
{
this.notification('Please specify at least one recipient');
bResult = false;
}
if (bResult && this.encrypt())
{
aPublicKeys = _.compact(_.map(this.to(), function (sEmail) {
var oKey = fFindPublicKey(sEmail);
if (!oKey && bResult)
{
self.notification('No public key found for "' + sEmail + '" email!');
bResult = false;
}
return oKey;
}));
if (0 === aPublicKeys.length || this.to().length !== aPublicKeys.length)
{
bResult = false;
}
}
_.delay(function () {
if (self.resultCallback && bResult)
{
try {
if (oPrivateKey && 0 === aPublicKeys.length)
{
self.resultCallback(
window.openpgp.signClearMessage([oPrivateKey], self.text())
);
}
else if (oPrivateKey && 0 < aPublicKeys.length)
{
self.resultCallback(
window.openpgp.signAndEncryptMessage(aPublicKeys, oPrivateKey, self.text())
);
}
else if (!oPrivateKey && 0 < aPublicKeys.length)
{
self.resultCallback(
window.openpgp.encryptMessage(aPublicKeys, self.text())
);
}
}
catch (e)
{
self.notification('OpenPGP error: ' + e);
bResult = false;
}
}
if (bResult)
{
self.cancelCommand();
}
self.submitRequest(false);
}, 10);
}, function () {
return '' === this.notification();
return !this.submitRequest() && (this.sign() || this.encrypt());
});
Knoin.constructorEnd(this);
@ -10294,6 +10456,14 @@ PopupsComposeOpenPgpViewModel.prototype.clearPopup = function ()
this.password('');
this.password.focus(false);
this.from('');
this.to([]);
this.text('');
this.submitRequest(false);
this.resultCallback = null;
};
PopupsComposeOpenPgpViewModel.prototype.onHide = function ()
@ -10311,20 +10481,11 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
aRec = []
;
if ('' === sTo + sCc + sBcc)
{
this.notification('Please specify at least one recipient');
return false;
}
this.resultCallback = fCallback;
oEmail.clear();
oEmail.mailsoParse(sFromEmail);
if ('' === oEmail.email)
{
this.notification('Please specify From email address');
return false;
}
else
if ('' !== oEmail.email)
{
sResultFromEmail = oEmail.email;
}
@ -10351,26 +10512,11 @@ PopupsComposeOpenPgpViewModel.prototype.onShow = function (fCallback, sText, sFr
return '' === oEmail.email ? false : oEmail.email;
}));
if (0 === aRec.length)
{
this.notification('Please specify at least one recipient');
return false;
}
window.console.log(sResultFromEmail);
window.console.log(aRec);
// TODO
this.from(sResultFromEmail);
this.to(aRec);
this.text(sText);
};
PopupsComposeOpenPgpViewModel.prototype.onFocus = function ()
{
if (this.sign())
{
this.password.focus(true);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10518,7 +10664,7 @@ PopupsIdentityViewModel.prototype.onFocus = function ()
this.email.focused(true);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10578,7 +10724,7 @@ PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10698,7 +10844,7 @@ PopupsAskViewModel.prototype.onBuild = function ()
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -10970,7 +11116,7 @@ LoginViewModel.prototype.selectLanguage = function ()
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11037,7 +11183,7 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
});
};
};
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -11049,7 +11195,7 @@ function MailBoxSystemDropDownViewModel()
}
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends AbstractSystemDropDownViewModel
@ -11061,7 +11207,7 @@ function SettingsSystemDropDownViewModel()
}
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11190,7 +11336,7 @@ MailBoxFolderListViewModel.prototype.contactsClick = function ()
kn.showScreenPopup(PopupsContactsViewModel);
}
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -11896,7 +12042,7 @@ MailBoxMessageListViewModel.prototype.initUploaderForAppend = function ()
;
return !!oJua;
};
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12269,7 +12415,7 @@ MailBoxMessageViewViewModel.prototype.readReceipt = function (oMessage)
RL.reloadFlagsCurrentMessageListAndMessageFromCache();
}
};
/**
* @param {?} oScreen
*
@ -12296,7 +12442,7 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -12319,7 +12465,7 @@ SettingsPaneViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(RL.link().inbox());
};
/**
* @constructor
*/
@ -12479,7 +12625,7 @@ SettingsGeneral.prototype.selectLanguage = function ()
{
kn.showScreenPopup(PopupsLanguagesViewModel);
};
/**
* @constructor
*/
@ -12517,7 +12663,7 @@ SettingsContacts.prototype.onShow = function ()
{
this.showPassword(false);
};
/**
* @constructor
*/
@ -12598,7 +12744,7 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
}
}
};
/**
* @constructor
*/
@ -12686,7 +12832,7 @@ SettingsIdentity.prototype.onBuild = function ()
}, 50);
};
/**
* @constructor
*/
@ -12844,7 +12990,7 @@ SettingsIdentities.prototype.onBuild = function (oDom)
});
}, 50);
};
};
/**
* @constructor
*/
@ -12911,25 +13057,15 @@ function SettingsSocialScreen()
}
Utils.addSettingsViewModel(SettingsSocialScreen, 'SettingsSocial', 'SETTINGS_LABELS/LABEL_SOCIAL_NAME', 'social');
/**
* @constructor
*/
function SettingsOpenPGP()
{
this.openpgpkeys = RL.data().openpgpkeys;
this.openpgpkeysPublic = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && !oItem.isPrivate);
});
}, this);
this.openpgpkeysPrivate = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && oItem.isPrivate);
});
}, this);
this.openpgpkeysPublic = RL.data().openpgpkeysPublic;
this.openpgpkeysPrivate = RL.data().openpgpkeysPrivate;
this.openPgpKeyForDeletion = ko.observable(null).extend({'falseTimeout': 3000}).extend({'toggleSubscribe': [this,
function (oPrev) {
@ -13006,7 +13142,7 @@ SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
RL.reloadOpenPgpKeys();
}
}
};
};
/**
* @constructor
*/
@ -13070,7 +13206,7 @@ SettingsChangePasswordScreen.prototype.onChangePasswordResponse = function (sRes
this.passwordUpdateError(true);
}
};
/**
* @constructor
*/
@ -13265,7 +13401,7 @@ SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
oFolder.subScribed(false);
};
/**
* @constructor
*/
@ -13490,7 +13626,7 @@ SettingsThemes.prototype.initCustomThemeUploader = function ()
return false;
};
/**
* @constructor
*/
@ -13565,7 +13701,7 @@ AbstractData.prototype.populateDataOnStart = function()
this.contactsIsAllowed(!!RL.settingsGet('ContactsIsAllowed'));
};
/**
* @constructor
* @extends AbstractData
@ -13664,7 +13800,6 @@ function WebMailDataStorage()
return bLoading || bCreating || bDeleting || bRenaming;
}, this);
this.foldersInboxUnreadCount = ko.observable(0);
this.currentFolder = ko.observable(null).extend({'toggleSubscribe': [null,
@ -13914,6 +14049,18 @@ function WebMailDataStorage()
this.openpgpkeys = ko.observableArray([]);
this.openpgpKeyring = null;
this.openpgpkeysPublic = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && !oItem.isPrivate);
});
}, this);
this.openpgpkeysPrivate = ko.computed(function () {
return _.filter(this.openpgpkeys(), function (oItem) {
return !!(oItem && oItem.isPrivate);
});
}, this);
// google
this.googleActions = ko.observable(false);
this.googleLoggined = ko.observable(false);
@ -14282,7 +14429,6 @@ WebMailDataStorage.prototype.getNextFolderNames = function (bBoot)
};
/**
* @param {Function} fCallback
* @param {string} sFromFolderFullNameRaw
* @param {Array} aUidForRemove
* @param {string=} sToFolderFullNameRaw = ''
@ -14704,7 +14850,7 @@ WebMailDataStorage.prototype.setMessageList = function (oData, bCached)
));
}
};
/**
* @constructor
*/
@ -14978,7 +15124,7 @@ AbstractAjaxRemoteStorage.prototype.jsVersion = function (fCallback, sVersion)
'Version': sVersion
});
};
/**
* @constructor
* @extends AbstractAjaxRemoteStorage
@ -15678,7 +15824,7 @@ WebMailAjaxRemoteStorage.prototype.socialUsers = function (fCallback)
this.defaultRequest(fCallback, 'SocialUsers');
};
/**
* @constructor
*/
@ -15744,7 +15890,7 @@ AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
{
this.oEmailsPicsHashes = oData;
};
/**
* @constructor
* @extends AbstractCacheStorage
@ -16062,7 +16208,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
}
};
/**
* @param {Array} aViewModels
* @constructor
@ -16240,7 +16386,7 @@ AbstractSettings.prototype.routes = function ()
['', oRules]
];
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -16255,7 +16401,7 @@ _.extend(LoginScreen.prototype, KnoinAbstractScreen.prototype);
LoginScreen.prototype.onShow = function ()
{
RL.setTitle('');
};
};
/**
* @constructor
* @extends KnoinAbstractScreen
@ -16436,7 +16582,7 @@ MailBoxScreen.prototype.routes = function ()
[/^([^\/]*)$/, {'normalize_': fNormS}]
];
};
/**
* @constructor
* @extends AbstractSettings
@ -16464,7 +16610,7 @@ SettingsScreen.prototype.onShow = function ()
RL.setTitle(this.sSettingsTitle);
};
/**
* @constructor
* @extends KnoinAbstractBoot
@ -16784,7 +16930,7 @@ AbstractApp.prototype.bootstart = function ()
ssm.ready();
};
/**
* @constructor
* @extends AbstractApp
@ -17113,6 +17259,7 @@ RainLoopApp.prototype.reloadOpenPgpKeys = function ()
{
var
aKeys = [],
oEmail = new EmailModel(),
oOpenpgpKeyring = RL.data().openpgpKeyring,
oOpenpgpKeys = oOpenpgpKeyring ? oOpenpgpKeyring.keys : []
;
@ -17120,20 +17267,28 @@ RainLoopApp.prototype.reloadOpenPgpKeys = function ()
_.each(oOpenpgpKeys, function (oItem, iIndex) {
if (oItem && oItem.primaryKey)
{
var
var
oPrimaryUser = oItem.getPrimaryUser(),
sUser = (oPrimaryUser && oPrimaryUser.user) ? oPrimaryUser.user.userId.userid
: (oItem.users && oItem.users[0] ? oItem.users[0].userId.userid : '')
;
aKeys.push(new OpenPgpKeyModel(
iIndex,
oItem.primaryKey.getFingerprint(),
oItem.primaryKey.getKeyId().toHex().toLowerCase(),
sUser,
oItem.isPrivate(),
oItem.armor())
);
oEmail.clear();
oEmail.mailsoParse(sUser);
if (oEmail.validate())
{
aKeys.push(new OpenPgpKeyModel(
iIndex,
oItem.primaryKey.getFingerprint(),
oItem.primaryKey.getKeyId().toHex().toLowerCase(),
sUser,
oEmail.email,
oItem.isPrivate(),
oItem.armor())
);
}
}
});
@ -17899,7 +18054,7 @@ RainLoopApp.prototype.bootstart = function ()
* @type {RainLoopApp}
*/
RL = new RainLoopApp();
$html.addClass(Globals.bMobileDevice ? 'mobile' : 'no-mobile');
$window.keydown(Utils.killCtrlAandS).keyup(Utils.killCtrlAandS);
@ -17946,9 +18101,9 @@ window['__RLBOOT'] = function (fCall) {
window['__RLBOOT'] = null;
});
};
if (window.SimplePace) {
window.SimplePace.add(10);
}
}
}(window, jQuery, ko, crossroads, hasher, moment, Jua, _, ifvisible));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long