Small fixes and code refactoring

This commit is contained in:
RainLoop Team 2015-02-16 01:55:59 +04:00
parent e6c712862d
commit 1a85330770
67 changed files with 413 additions and 181 deletions

View file

@ -30,6 +30,8 @@
this.code.focused = ko.observable(false);
this.code.status = ko.observable(null);
this.koTestedTrigger = null;
this.testing = ko.observable(false);
// commands
@ -41,6 +43,11 @@
self.testing(false);
self.code.status(Enums.StorageResultType.Success === sResult && oData && oData.Result ? true : false);
if (self.koTestedTrigger && self.code.status())
{
self.koTestedTrigger(true);
}
}, this.code());
}, function () {
@ -59,14 +66,18 @@
this.code.focused(false);
this.code.status(null);
this.testing(false);
this.koTestedTrigger = null;
};
TwoFactorTestPopupView.prototype.onShow = function ()
TwoFactorTestPopupView.prototype.onShow = function (koTestedTrigger)
{
this.clearPopup();
this.koTestedTrigger = koTestedTrigger;
};
TwoFactorTestPopupView.prototype.onFocus = function ()
TwoFactorTestPopupView.prototype.onShowWithDelay = function ()
{
this.code.focused(true);
};