Code refactoring

Enable password validation (password change plugins)
This commit is contained in:
RainLoop Team 2014-10-04 22:31:29 +04:00
parent 8af2140e7a
commit 78f09856e3
8 changed files with 53 additions and 57 deletions

View file

@ -404,24 +404,23 @@
AppApp.prototype.folders = function (fCallback)
{
Data.foldersLoading(true);
Remote.folders(_.bind(function (sResult, oData) {
var bResult = false;
Data.foldersLoading(false);
if (Enums.StorageResultType.Success === sResult)
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
{
bResult = true;
this.setFolders(oData);
if (fCallback)
{
fCallback(true);
}
}
else
if (fCallback)
{
if (fCallback)
{
fCallback(false);
}
fCallback(bResult);
}
}, this));
};
@ -1396,7 +1395,7 @@
}
else
{
self.bootstartLoginScreen();
this.bootstartLoginScreen();
}
if (SimplePace)

View file

@ -16,6 +16,7 @@
this.sBase = '#/';
this.sServer = './?';
this.sSubQuery = '&/s/=/';
this.sVersion = Settings.settingsGet('Version');
this.sSpecSuffix = Settings.settingsGet('AuthAccountHash') || '0';
this.sStaticPrefix = Settings.settingsGet('StaticPrefix') || 'rainloop/v/' + this.sVersion + '/static/';
@ -35,7 +36,7 @@
*/
LinkBuilder.prototype.attachmentDownload = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/Download/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + sDownload;
};
/**
@ -44,7 +45,7 @@
*/
LinkBuilder.prototype.attachmentPreview = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/View/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/View/' + sDownload;
};
/**
@ -53,7 +54,7 @@
*/
LinkBuilder.prototype.attachmentPreviewAsPlain = function (sDownload)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/ViewAsPlain/' + sDownload;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + sDownload;
};
/**
@ -103,7 +104,7 @@
*/
LinkBuilder.prototype.ajax = function (sAdd)
{
return this.sServer + '/Ajax/' + this.sSpecSuffix + '/' + sAdd;
return this.sServer + '/Ajax/' + this.sSubQuery + this.sSpecSuffix + '/' + sAdd;
};
/**
@ -112,7 +113,7 @@
*/
LinkBuilder.prototype.messageViewLink = function (sRequestHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/ViewAsPlain/' + sRequestHash;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/ViewAsPlain/' + sRequestHash;
};
/**
@ -121,7 +122,7 @@
*/
LinkBuilder.prototype.messageDownloadLink = function (sRequestHash)
{
return this.sServer + '/Raw/' + this.sSpecSuffix + '/Download/' + sRequestHash;
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/Download/' + sRequestHash;
};
/**

View file

@ -70,14 +70,14 @@
}
}
if (oData.Logout || Consts.Values.AjaxErrorLimit < Globals.iAjaxErrorCount)
if (oData.ClearAuth || oData.Logout || Consts.Values.AjaxErrorLimit < Globals.iAjaxErrorCount)
{
if (window.__rlah_clear)
{
window.__rlah_clear();
}
if (Globals.__APP__)
if (!oData.ClearAuth && Globals.__APP__)
{
Globals.__APP__.loginAndLogoutReload(true);
}

View file

@ -260,6 +260,7 @@ html.rl-ctrl-key-pressed {
#rl-loading, #rl-loading-error {
position: absolute;
font-size: 30px;
line-height: 100%;
top: 50%;
width: 100%;
height: 65px;