Experimental support for wildcards in the domain name.

This commit is contained in:
RainLoop Team 2014-02-08 03:28:11 +04:00
parent ab07d102f9
commit 93e09effba
5 changed files with 276 additions and 253 deletions

View file

@ -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);