Improvements of message displaying (internal styles)

This commit is contained in:
RainLoop Team 2015-05-31 21:40:54 +04:00
parent 0bba7146a6
commit 4457cdbc23
46 changed files with 1967 additions and 359 deletions

View file

@ -36,6 +36,8 @@
{
AbstractView.call(this, 'Center', 'Login');
this.welcome = ko.observable(!!Settings.settingsGet('UseLoginWelcomePage'));
this.email = ko.observable('');
this.password = ko.observable('');
this.signMe = ko.observable(false);
@ -294,11 +296,12 @@
});
this.googleLoginEnabled = ko.observable(false);
this.googleFastLoginEnabled = ko.observable(false);
this.googleCommand = Utils.createCommand(this, function () {
window.open(Links.socialGoogle(), 'Google',
'left=200,top=100,width=650,height=450,menubar=no,status=no,resizable=yes,scrollbars=yes');
'left=200,top=100,width=650,height=500,menubar=no,status=no,resizable=yes,scrollbars=yes');
return true;
@ -306,15 +309,15 @@
return !this.submitRequest() && this.googleLoginEnabled();
});
this.googleXAuthCommand = Utils.createCommand(this, function () {
this.googleFastCommand = Utils.createCommand(this, function () {
window.open(Links.socialGoogle(true), 'Google',
'left=200,top=100,width=650,height=450,menubar=no,status=no,resizable=yes,scrollbars=yes');
'left=200,top=100,width=650,height=500,menubar=no,status=no,resizable=yes,scrollbars=yes');
return true;
}, function () {
return !this.submitRequest() && this.googleLoginEnabled();
return !this.submitRequest() && this.googleFastLoginEnabled();
});
this.twitterLoginEnabled = ko.observable(false);
@ -347,6 +350,11 @@
kn.extendAsViewModel(['View/User/Login', 'View/App/Login', 'LoginViewModel'], LoginUserView);
_.extend(LoginUserView.prototype, AbstractView.prototype);
LoginUserView.prototype.displayMainForm = function ()
{
this.welcome(false);
};
LoginUserView.prototype.onShow = function ()
{
kn.routeOff();
@ -404,6 +412,8 @@
this.twitterLoginEnabled(!!Settings.settingsGet('AllowTwitterSocial'));
this.googleLoginEnabled(!!Settings.settingsGet('AllowGoogleSocial') &&
!!Settings.settingsGet('AllowGoogleSocialAuth'));
this.googleFastLoginEnabled(!!Settings.settingsGet('AllowGoogleSocial') &&
!!Settings.settingsGet('AllowGoogleSocialAuthFast'));
switch (sSignMe)
{
@ -433,7 +443,7 @@
this.email(AppStore.devEmail);
this.password(AppStore.devPassword);
if (this.googleLoginEnabled())
if (this.googleLoginEnabled() || this.googleFastLoginEnabled())
{
window['rl_' + sJsHash + '_google_login_service'] = fSocial;
}