mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Experimental support for wildcards in the domain name.
This commit is contained in:
parent
ab07d102f9
commit
93e09effba
5 changed files with 276 additions and 253 deletions
|
|
@ -22,6 +22,8 @@ function PopupsDomainViewModel()
|
|||
this.smtpServerFocus = ko.observable(false);
|
||||
|
||||
this.name = ko.observable('');
|
||||
this.name.focused = ko.observable(false);
|
||||
|
||||
this.imapServer = ko.observable('');
|
||||
this.imapPort = ko.observable(Consts.Values.ImapDefaulPort);
|
||||
this.imapSecure = ko.observable(Enums.ServerSecure.None);
|
||||
|
|
@ -36,7 +38,7 @@ function PopupsDomainViewModel()
|
|||
this.imapServerFocus.subscribe(function (bValue) {
|
||||
if (bValue && '' !== this.name() && '' === this.imapServer())
|
||||
{
|
||||
this.imapServer(this.name());
|
||||
this.imapServer(this.name().replace(/[.]?[*][.]?/g, ''));
|
||||
}
|
||||
}, this);
|
||||
|
||||
|
|
@ -186,6 +188,14 @@ PopupsDomainViewModel.prototype.onShow = function (oDomain)
|
|||
}
|
||||
};
|
||||
|
||||
PopupsDomainViewModel.prototype.onFocus = function ()
|
||||
{
|
||||
if ('' === this.name())
|
||||
{
|
||||
this.name.focused(true);
|
||||
}
|
||||
};
|
||||
|
||||
PopupsDomainViewModel.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
|
|
@ -208,6 +218,8 @@ PopupsDomainViewModel.prototype.clearForm = function ()
|
|||
this.savingError('');
|
||||
|
||||
this.name('');
|
||||
this.name.focused(false);
|
||||
|
||||
this.imapServer('');
|
||||
this.imapPort(Consts.Values.ImapDefaulPort);
|
||||
this.imapSecure(Enums.ServerSecure.None);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue