mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Small fixes
This commit is contained in:
parent
1dc561c25e
commit
ef7f8bddb3
2 changed files with 51 additions and 38 deletions
|
|
@ -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,48 +159,54 @@
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.imapSecure.subscribe(function (sValue) {
|
this.imapSecure.subscribe(function (sValue) {
|
||||||
var iPort = Utils.pInt(this.imapPort());
|
if (this.enableSmartPorts())
|
||||||
sValue = Utils.pString(sValue);
|
|
||||||
switch (sValue)
|
|
||||||
{
|
{
|
||||||
case '0':
|
var iPort = Utils.pInt(this.imapPort());
|
||||||
if (993 === iPort)
|
sValue = Utils.pString(sValue);
|
||||||
{
|
switch (sValue)
|
||||||
this.imapPort('143');
|
{
|
||||||
}
|
case '0':
|
||||||
break;
|
if (993 === iPort)
|
||||||
case '1':
|
{
|
||||||
if (143 === iPort)
|
this.imapPort('143');
|
||||||
{
|
}
|
||||||
this.imapPort('993');
|
break;
|
||||||
}
|
case '1':
|
||||||
break;
|
if (143 === iPort)
|
||||||
|
{
|
||||||
|
this.imapPort('993');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.smtpSecure.subscribe(function (sValue) {
|
this.smtpSecure.subscribe(function (sValue) {
|
||||||
var iPort = Utils.pInt(this.smtpPort());
|
if (this.enableSmartPorts())
|
||||||
sValue = Utils.pString(sValue);
|
|
||||||
switch (sValue)
|
|
||||||
{
|
{
|
||||||
case '0':
|
var iPort = Utils.pInt(this.smtpPort());
|
||||||
if (465 === iPort || 587 === iPort)
|
sValue = Utils.pString(sValue);
|
||||||
{
|
switch (sValue)
|
||||||
this.smtpPort('25');
|
{
|
||||||
}
|
case '0':
|
||||||
break;
|
if (465 === iPort || 587 === iPort)
|
||||||
case '1':
|
{
|
||||||
if (25 === iPort || 587 === iPort)
|
this.smtpPort('25');
|
||||||
{
|
}
|
||||||
this.smtpPort('465');
|
break;
|
||||||
}
|
case '1':
|
||||||
break;
|
if (25 === iPort || 587 === iPort)
|
||||||
case '2':
|
{
|
||||||
if (25 === iPort || 465 === iPort)
|
this.smtpPort('465');
|
||||||
{
|
}
|
||||||
this.smtpPort('587');
|
break;
|
||||||
}
|
case '2':
|
||||||
break;
|
if (25 === iPort || 465 === iPort)
|
||||||
|
{
|
||||||
|
this.smtpPort('587');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, this);
|
}, 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;
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue