Small fixes

This commit is contained in:
RainLoop Team 2014-10-14 02:39:23 +04:00
parent 1dc561c25e
commit ef7f8bddb3
2 changed files with 51 additions and 38 deletions

View file

@ -73,6 +73,8 @@
this.smtpAuth = ko.observable(true); this.smtpAuth = ko.observable(true);
this.whiteList = ko.observable(''); this.whiteList = ko.observable('');
this.enableSmartPorts = ko.observable(false);
this.headerText = ko.computed(function () { this.headerText = ko.computed(function () {
var sName = this.name(); var sName = this.name();
return this.edit() ? 'Edit Domain "' + sName + '"' : return this.edit() ? 'Edit Domain "' + sName + '"' :
@ -157,6 +159,8 @@
}, this); }, this);
this.imapSecure.subscribe(function (sValue) { this.imapSecure.subscribe(function (sValue) {
if (this.enableSmartPorts())
{
var iPort = Utils.pInt(this.imapPort()); var iPort = Utils.pInt(this.imapPort());
sValue = Utils.pString(sValue); sValue = Utils.pString(sValue);
switch (sValue) switch (sValue)
@ -174,9 +178,12 @@
} }
break; break;
} }
}
}, this); }, this);
this.smtpSecure.subscribe(function (sValue) { this.smtpSecure.subscribe(function (sValue) {
if (this.enableSmartPorts())
{
var iPort = Utils.pInt(this.smtpPort()); var iPort = Utils.pInt(this.smtpPort());
sValue = Utils.pString(sValue); sValue = Utils.pString(sValue);
switch (sValue) switch (sValue)
@ -200,6 +207,7 @@
} }
break; break;
} }
}
}, this); }, this);
kn.constructorEnd(this); kn.constructorEnd(this);
@ -273,6 +281,8 @@
this.clearForm(); this.clearForm();
if (oDomain) if (oDomain)
{ {
this.enableSmartPorts(false);
this.edit(true); this.edit(true);
this.name(Utils.trim(oDomain.Name)); this.name(Utils.trim(oDomain.Name));
@ -288,6 +298,8 @@
this.smtpShortLogin(!!oDomain.OutShortLogin); this.smtpShortLogin(!!oDomain.OutShortLogin);
this.smtpAuth(!!oDomain.OutAuth); this.smtpAuth(!!oDomain.OutAuth);
this.whiteList(Utils.trim(oDomain.WhiteList)); this.whiteList(Utils.trim(oDomain.WhiteList));
this.enableSmartPorts(true);
} }
}; };
@ -303,6 +315,7 @@
{ {
this.edit(false); this.edit(false);
this.whiteListPage(false); this.whiteListPage(false);
this.enableSmartPorts(false);
this.savingError(''); this.savingError('');
@ -321,6 +334,8 @@
this.smtpShortLogin(false); this.smtpShortLogin(false);
this.smtpAuth(true); this.smtpAuth(true);
this.whiteList(''); this.whiteList('');
this.enableSmartPorts(true);
}; };
module.exports = DomainPopupView; module.exports = DomainPopupView;

View file

@ -7482,8 +7482,6 @@ class Actions
$mResult['Plain'] = $sPlain; $mResult['Plain'] = $sPlain;
// $mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain); // $mResult['Plain'] = 0 === \strlen($sPlain) ? '' : \MailSo\Base\HtmlUtils::ConvertPlainToHtml($sPlain);
$this->Logger()->WriteDump($mResult['Html']);
$mResult['TextHash'] = \md5($mResult['Html'].$mResult['Plain']); $mResult['TextHash'] = \md5($mResult['Html'].$mResult['Plain']);
$mResult['TextPartIsTrimmed'] = $mResponse->TextPartIsTrimmed(); $mResult['TextPartIsTrimmed'] = $mResponse->TextPartIsTrimmed();