+ Small fixes
This commit is contained in:
RainLoop Team 2014-04-18 02:42:30 +04:00
parent 524743ecbe
commit 3221b0651e
28 changed files with 1096 additions and 91 deletions

View file

@ -114,7 +114,7 @@ MailBoxFolderListViewModel.prototype.onBuild = function (oDom)
return false;
});
key('esc, tab, shift+tab', Enums.KeyState.FolderList, function () {
key('esc, tab, shift+tab, right', Enums.KeyState.FolderList, function () {
self.folderList.focused(false);
return false;
});

View file

@ -759,8 +759,8 @@ MailBoxMessageListViewModel.prototype.initShortcuts = function ()
});
// change focused state
key('tab, shift+tab', Enums.KeyState.MessageList, function (event, handler) {
if (event && handler && 'shift+tab' === handler.shortcut)
key('tab, shift+tab, left, right', Enums.KeyState.MessageList, function (event, handler) {
if (event && handler && 'shift+tab' === handler.shortcut || 'left' === handler.shortcut)
{
self.folderList.focused(true);
}

View file

@ -227,21 +227,22 @@ MailBoxMessageViewViewModel.prototype.pgpStatusVerifyMessage = function ()
var sResult = '';
switch (this.viewPgpSignedVerifyStatus())
{
// TODO i18n
case Enums.SignedVerifyStatus.UnknownPublicKeys:
sResult = 'No public keys found';
sResult = Utils.i18n('PGP_NOTIFICATIONS/NO_PUBLIC_KEYS_FOUND');
break;
case Enums.SignedVerifyStatus.UnknownPrivateKey:
sResult = 'No private key found';
sResult = Utils.i18n('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND');
break;
case Enums.SignedVerifyStatus.Unverified:
sResult = 'Unverified signature';
sResult = Utils.i18n('PGP_NOTIFICATIONS/UNVERIFIRED_SIGNATURE');
break;
case Enums.SignedVerifyStatus.Error:
sResult = 'OpenPGP decryption error';
sResult = Utils.i18n('PGP_NOTIFICATIONS/DECRYPTION_ERROR');
break;
case Enums.SignedVerifyStatus.Success:
sResult = 'Good signature from ' + this.viewPgpSignedVerifyUser();
sResult = Utils.i18n('PGP_NOTIFICATIONS/GOOD_SIGNATURE', {
'USER': this.viewPgpSignedVerifyUser()
});
break;
}
@ -522,8 +523,8 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
});
// change focused state
key('tab, shift+tab', Enums.KeyState.MessageView, function () {
if (!self.fullScreenMode() && self.message())
key('tab, shift+tab, left', Enums.KeyState.MessageView, function () {
if (!self.fullScreenMode() && self.message() && Enums.Layout.NoPreview !== oData.layout())
{
self.message.focused(false);
}

View file

@ -40,8 +40,7 @@ function PopupsComposeOpenPgpViewModel()
if (bResult && this.sign() && '' === this.from())
{
// TODO i18n
this.notification('Please specify FROM email address');
this.notification(Utils.i18n('PGP_NOTIFICATIONS/SPECIFY_FROM_EMAIL'));
bResult = false;
}
@ -50,16 +49,17 @@ function PopupsComposeOpenPgpViewModel()
oPrivateKey = oData.findPrivateKeyByEmail(this.from(), this.password());
if (!oPrivateKey)
{
// TODO i18n
this.notification('No private key found for "' + this.from() + '" email');
this.notification(Utils.i18n('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND_FOR', {
'EMAIL': this.from()
}));
bResult = false;
}
}
if (bResult && this.encrypt() && 0 === this.to().length)
{
// TODO i18n
this.notification('Please specify at least one recipient');
this.notification(Utils.i18n('PGP_NOTIFICATIONS/SPECIFY_AT_LEAST_ONE_RECIPIENT'));
bResult = false;
}
@ -70,8 +70,10 @@ function PopupsComposeOpenPgpViewModel()
var aKeys = oData.findPublicKeysByEmail(sEmail);
if (0 === aKeys.length && bResult)
{
// TODO i18n
self.notification('No public key found for "' + sEmail + '" email');
this.notification(Utils.i18n('PGP_NOTIFICATIONS/NO_PUBLIC_KEYS_FOUND_FOR', {
'EMAIL': sEmail
}));
bResult = false;
}
@ -111,8 +113,10 @@ function PopupsComposeOpenPgpViewModel()
}
catch (e)
{
// TODO i18n
self.notification('OpenPGP error: ' + e);
self.notification(Utils.i18n('PGP_NOTIFICATIONS/PGP_ERROR', {
'ERROR': '' + e
}));
bResult = false;
}
}