Pre release fixes and improvements

This commit is contained in:
RainLoop Team 2015-02-01 19:44:44 +04:00
parent 67c5e31e58
commit abddb3d828
61 changed files with 378 additions and 57 deletions

View file

@ -85,7 +85,7 @@
* @const
* @type {number}
*/
Consts.Values.SieveDefaulPort = 2000;
Consts.Values.SieveDefaulPort = 4190;
/**
* @const

View file

@ -425,6 +425,7 @@
'LicensingBanned': 712,
'DemoSendMessageError': 750,
'DemoAccountError': 751,
'AccountAlreadyExists': 801,
'AccountDoesNotExist': 802,

View file

@ -181,6 +181,7 @@
oN[Enums.Notification.LicensingBanned] = this.i18n('NOTIFICATIONS/LICENSING_BANNED');
oN[Enums.Notification.DemoSendMessageError] = this.i18n('NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR');
oN[Enums.Notification.DemoAccountError] = this.i18n('NOTIFICATIONS/DEMO_ACCOUNT_ERROR');
oN[Enums.Notification.AccountAlreadyExists] = this.i18n('NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS');
oN[Enums.Notification.AccountDoesNotExist] = this.i18n('NOTIFICATIONS/ACCOUNT_DOES_NOT_EXIST');

View file

@ -27,11 +27,13 @@
this.value = oParams.value || '';
this.size = oParams.size || 0;
this.label = oParams.label || '';
this.preLabel = oParams.preLabel || '';
this.enable = Utils.isUnd(oParams.enable) ? true : oParams.enable;
this.trigger = oParams.trigger && oParams.trigger.subscribe ? oParams.trigger : null;
this.placeholder = oParams.placeholder || '';
this.labeled = !Utils.isUnd(oParams.label);
this.preLabeled = !Utils.isUnd(oParams.preLabel);
this.triggered = !Utils.isUnd(oParams.trigger) && !!this.trigger;
this.classForTrigger = ko.observable('');

View file

@ -41,12 +41,12 @@
this.actionValue.error = ko.observable(false);
this.actionValueSecond = ko.observable('');
this.actionValueThird = ko.observable('');
this.actionMarkAsRead = ko.observable(false);
this.actionSkipOthers = ko.observable(false);
this.actionKeep = ko.observable(true);
this.actionNoStop = ko.observable(false);
this.actionType = ko.observable(Enums.FiltersAction.MoveTo);
@ -54,6 +54,7 @@
this.actionValue('');
this.actionValue.error(false);
this.actionValueSecond('');
this.actionValueThird('');
}, this);
var fGetRealFolderName = function (sFolderFullNameRaw) {
@ -136,7 +137,7 @@
this.actionValue.error('' === sValue);
}, this));
this.regDisposables([this.actionTemplate]);
this.regDisposables([this.actionNoStop, this.actionTemplate]);
this.deleteAccess = ko.observable(false);
this.canBeDalete = ko.observable(true);
@ -207,11 +208,12 @@
'ActionValue': this.actionValue(),
'ActionValueSecond': this.actionValueSecond(),
'ActionValueThird': this.actionValueThird(),
'ActionType': this.actionType(),
'Stop': this.actionNoStop() ? '0' : '1',
'Keep': this.actionKeep() ? '1' : '0',
'MarkAsRead': this.actionMarkAsRead() ? '1' : '0',
'SkipOthers': this.actionSkipOthers() ? '1' : '0'
'MarkAsRead': this.actionMarkAsRead() ? '1' : '0'
};
};
@ -252,10 +254,11 @@
this.actionValue(Utils.pString(oItem['ActionValue']));
this.actionValueSecond(Utils.pString(oItem['ActionValueSecond']));
this.actionValueThird(Utils.pString(oItem['ActionValueThird']));
this.actionNoStop(!oItem['Stop']);
this.actionKeep(!!oItem['Keep']);
this.actionMarkAsRead(!!oItem['MarkAsRead']);
this.actionSkipOthers(!!oItem['SkipOthers']);
bResult = true;
}
@ -277,7 +280,6 @@
oClone.conditionsType(this.conditionsType());
oClone.actionMarkAsRead(this.actionMarkAsRead());
oClone.actionSkipOthers(this.actionSkipOthers());
oClone.actionType(this.actionType());
@ -285,8 +287,10 @@
oClone.actionValue.error(this.actionValue.error());
oClone.actionValueSecond(this.actionValueSecond());
oClone.actionValueThird(this.actionValueThird());
oClone.actionKeep(this.actionKeep());
oClone.actionNoStop(this.actionNoStop());
oClone.conditions(_.map(this.conditions(), function (oCondition) {
return oCondition.cloneSelf();

View file

@ -50,7 +50,7 @@
AccountsUserSettings.prototype.scrollableOptions = function ()
{
return {
handle: '.drag-handle'
};
};

View file

@ -117,7 +117,7 @@
FiltersUserSettings.prototype.scrollableOptions = function ()
{
return {
// handle: '.drag-handle'
handle: '.drag-handle'
};
};

107
dev/Stores/User/Pgp.js Normal file
View file

@ -0,0 +1,107 @@
(function () {
'use strict';
// var
// window = require('window')
// ;
/**
* @constructor
*/
function PgpUserStore()
{
this.openpgp = null;
this.keyring = [];
}
PgpUserStore.prototype.sign = function (sText, oPrivateKey)
{
try
{
return this.openpgp.signClearMessage([oPrivateKey], sText);
}
catch (oExc) {}
return sText;
};
PgpUserStore.prototype.encrypt = function (sText, aPublicKeys)
{
try
{
return this.openpgp.encryptMessage(aPublicKeys, sText);
}
catch (oExc) {}
return sText;
};
PgpUserStore.prototype.signAndEncrypt = function (sText, aPublicKeys, oPrivateKey)
{
try
{
return this.openpgp.signAndEncryptMessage(aPublicKeys, oPrivateKey, sText);
}
catch (oExc) {}
return sText;
};
/**/
PgpUserStore.prototype.verify = function (sText, aPublicKeys)
{
var
mPgpMessage = null
;
try
{
mPgpMessage = this.openpgp.cleartext.readArmored(sText);
if (mPgpMessage && mPgpMessage.getText)
{
mPgpMessage.verify(aPublicKeys);
}
}
catch (oExc) {}
return false;
};
PgpUserStore.prototype.decryptAndVerify = function (sEnctyptedText, aPublicKeys, oPivateKey)
{
var
mPgpMessageDecrypted = null,
mPgpMessage = null
;
try
{
mPgpMessage = this.openpgp.message.readArmored(sEnctyptedText);
if (mPgpMessage && oPivateKey && mPgpMessage.decrypt)
{
mPgpMessageDecrypted = mPgpMessage.decrypt(oPivateKey);
if (mPgpMessageDecrypted)
{
mPgpMessageDecrypted.verify(aPublicKeys);
}
}
}
catch (oExc) {}
return false;
};
/**
* @return {boolean}
*/
PgpUserStore.prototype.isSupported = function ()
{
return !!this.openpgp;
};
module.exports = new PgpUserStore();
}());

View file

@ -16,6 +16,14 @@
line-height: 30px;
}
.drag-handle {
color: #eee;
}
tr:hover .drag-handle {
color: #aaa;
}
.account-img {
font-size: 12px;
margin-right: 5px;
@ -35,6 +43,10 @@
cursor: pointer;
}
.drag-handle {
cursor: pointer;
}
.button-delete {
margin-right: 15px;
margin-top: 5px;

View file

@ -14,6 +14,18 @@
td {
padding: 4px 8px;
line-height: 30px;
&.drag-wrapper {
padding: 4px 0;
}
}
.drag-handle {
color: #eee;
}
tr:hover .drag-handle {
color: #aaa;
}
.filter-img {
@ -40,6 +52,10 @@
cursor: pointer;
}
.drag-handle {
cursor: pointer;
}
.button-delete {
margin-right: 15px;
margin-top: 5px;