Fix Firefox password autofill issue (Closes #229)

This commit is contained in:
RainLoop Team 2014-07-29 00:56:18 +04:00
parent 4d2df09946
commit eea55d4e0a
11 changed files with 212 additions and 166 deletions

View file

@ -23,12 +23,12 @@ function AdminLoginViewModel()
this.password.subscribe(function () {
this.passwordError(false);
}, this);
this.submitRequest = ko.observable(false);
this.submitError = ko.observable('');
this.submitCommand = Utils.createCommand(this, function () {
this.loginError('' === Utils.trim(this.login()));
this.passwordError('' === Utils.trim(this.password()));
@ -62,7 +62,7 @@ function AdminLoginViewModel()
}, this), this.login(), this.password());
return true;
}, function () {
return !this.submitRequest();
});
@ -86,3 +86,15 @@ AdminLoginViewModel.prototype.onHide = function ()
{
this.loginFocus(false);
};
AdminLoginViewModel.prototype.onBuild = function ()
{
_.delay(function () {
$('.checkAutocomplete').trigger('change');
}, 100);
};
AdminLoginViewModel.prototype.submitForm = function ()
{
this.submitCommand();
};