Additional accounts storage optimization

This commit is contained in:
RainLoop Team 2014-02-04 19:52:58 +04:00
parent cdd1a8e778
commit 23ddda9194
6 changed files with 93 additions and 53 deletions

View file

@ -221,14 +221,6 @@ AdminApp.prototype.bootstart = function ()
// }
kn.startScreens([AdminSettingsScreen]);
// if (!Globals.bMobileDevice)
// {
// _.defer(function () {
// Utils.initLayoutResizer('#rl-top-resizer-left', '#rl-top-resizer-right', '#rl-center',
// 120, 300, 200, 600, Enums.ClientSideKeyName.FolderListSize);
// });
// }
}
else
{

View file

@ -40,7 +40,6 @@ SettingsAccounts.prototype.addNewAccount = function ()
};
/**
*
* @param {AccountModel} oAccountToRemove
*/
SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
@ -59,8 +58,24 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
{
this.accounts.remove(fRemoveAccount);
RL.remote().accountDelete(function () {
RL.accountsAndIdentities();
RL.remote().accountDelete(function (sResult, oData) {
if (Enums.StorageResultType.Success === sResult && oData &&
oData.Result && oData.Reload)
{
kn.routeOff();
kn.setHash(RL.link().root(), true);
kn.routeOff();
_.defer(function () {
window.location.reload();
});
}
else
{
RL.accountsAndIdentities();
}
}, oAccountToRemove.email);
}
}