diff --git a/dev/Common/Enums.js b/dev/Common/Enums.js index 7dd46a727..b052389e2 100644 --- a/dev/Common/Enums.js +++ b/dev/Common/Enums.js @@ -110,6 +110,7 @@ 'Menu': 'menu', 'PopupComposeOpenPGP': 'compose-open-pgp', 'PopupMessageOpenPGP': 'message-open-pgp', + 'PopupViewOpenPGP': 'view-open-pgp', 'PopupKeyboardShortcutsHelp': 'popup-keyboard-shortcuts-help', 'PopupAsk': 'popup-ask' }; diff --git a/dev/View/Popup/ComposeOpenPgp.js b/dev/View/Popup/ComposeOpenPgp.js index bea06ea99..7710e12a1 100644 --- a/dev/View/Popup/ComposeOpenPgp.js +++ b/dev/View/Popup/ComposeOpenPgp.js @@ -57,7 +57,7 @@ return _.compact(_.map(PgpStore.openpgpkeysPublic(), function (oKey) { return -1 < Utils.inArray(oKey, self.encryptKeysView()) ? null : { 'id': oKey.guid, - 'name': '(' + oKey.id.substr(-6) + ') ' + oKey.user, + 'name': '(' + oKey.id.substr(-8).toUpperCase() + ') ' + oKey.user, 'key': oKey }; })); @@ -83,7 +83,7 @@ { if (!this.signKey()) { - this.notification(Translator.i18n('PGP_NOTIFICATIONS/SPECIFY_FROM_EMAIL')); + this.notification(Translator.i18n('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND')); bResult = false; } else if (!this.signKey().key) @@ -237,15 +237,12 @@ 'empty': !oOption.key, 'selected': ko.observable(!!oOption.key), 'user': oOption.key.user, - 'hash': oOption.key.id.substr(-6), + 'hash': oOption.key.id.substr(-8).toUpperCase(), 'key': oOption.key }); this.encryptKeys(aKeys); } - - }, function () { - return !this.submitRequest() && this.selectedPublicKey(); }); this.selectedPublicKey.subscribe(function (sValue) { @@ -286,8 +283,6 @@ this.encryptKeys([]); this.text(''); - this.submitRequest(false); - this.resultCallback = null; }; @@ -370,7 +365,7 @@ { this.signKey({ 'user': oKey.user || sEmail, - 'hash': oKey.id.substr(-6), + 'hash': oKey.id.substr(-8).toUpperCase(), 'key': oKey }); } @@ -389,7 +384,7 @@ 'empty': !oKey, 'selected': ko.observable(!!oKey), 'user': oKey ? (oKey.user || sEmail) : sEmail, - 'hash': oKey ? oKey.id.substr(-6) : '', + 'hash': oKey ? oKey.id.substr(-8).toUpperCase() : '', 'key': oKey }; }))); diff --git a/dev/View/Popup/MessageOpenPgp.js b/dev/View/Popup/MessageOpenPgp.js index 7a861c58c..85f178975 100644 --- a/dev/View/Popup/MessageOpenPgp.js +++ b/dev/View/Popup/MessageOpenPgp.js @@ -7,6 +7,7 @@ _ = require('_'), ko = require('ko'), key = require('key'), + $ = require('$'), Utils = require('Common/Utils'), Enums = require('Common/Enums'), @@ -61,18 +62,25 @@ _.delay(_.bind(function() { { if (!oPrivateKey.decrypt(Utils.pString(this.password()))) { + Utils.log('Error: Private key cannot be decrypted'); oPrivateKey = null; } } catch (e) { + Utils.log(e); oPrivateKey = null; } } + else + { + Utils.log('Error: Private key cannot be found'); + } } } - catch (oExc) + catch (e) { + Utils.log(e); oPrivateKey = null; } diff --git a/dev/View/Popup/ViewOpenPgpKey.js b/dev/View/Popup/ViewOpenPgpKey.js index 93f65a94b..b2e4193b4 100644 --- a/dev/View/Popup/ViewOpenPgpKey.js +++ b/dev/View/Popup/ViewOpenPgpKey.js @@ -6,7 +6,9 @@ var _ = require('_'), ko = require('ko'), + key = require('key'), + Enums = require('Common/Enums'), Utils = require('Common/Utils'), kn = require('Knoin/Knoin'), @@ -24,6 +26,8 @@ this.key = ko.observable(''); this.keyDom = ko.observable(null); + this.sDefaultKeyScope = Enums.KeyState.PopupViewOpenPGP; + kn.constructorEnd(this); } @@ -54,6 +58,14 @@ } }; + ViewOpenPgpKeyPopupView.prototype.onBuild = function () + { + key('ctrl+a, command+a', Enums.KeyState.PopupViewOpenPGP, _.bind(function () { + this.selectKey(); + return false; + }, this)); + }; + module.exports = ViewOpenPgpKeyPopupView; }()); \ No newline at end of file diff --git a/package.json b/package.json index e5df42537..9ccaa1ce2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RainLoop", "title": "RainLoop Webmail", "version": "1.9.2", - "release": "353", + "release": "357", "description": "Simple, modern & fast web-based email client", "homepage": "http://rainloop.net", "main": "gulpfile.js", diff --git a/rainloop/v/0.0.0/app/templates/Views/User/MailMessageView.html b/rainloop/v/0.0.0/app/templates/Views/User/MailMessageView.html index 8039cdf3d..2db4bbb65 100644 --- a/rainloop/v/0.0.0/app/templates/Views/User/MailMessageView.html +++ b/rainloop/v/0.0.0/app/templates/Views/User/MailMessageView.html @@ -1,4 +1,3 @@ -