User background image optimization

This commit is contained in:
RainLoop Team 2015-02-05 09:14:13 +04:00
parent 98e110fcc7
commit 47cc73c992
8 changed files with 114 additions and 106 deletions

View file

@ -171,6 +171,16 @@
return this.sServer + '/Raw/0/Public/' + sHash + '/';
};
/**
* @param {string} sHash
* @return {string}
*/
Links.prototype.userBackground = function (sHash)
{
return this.sServer + '/Raw/' + this.sSubQuery + this.sSpecSuffix + '/UserBackground/' +
this.sSubSubQuery + sHash;
};
/**
* @param {string} sInboxFolderName = 'INBOX'
* @return {string}

View file

@ -1614,7 +1614,7 @@
Utils.__themeTimer = 0;
Utils.__themeAjax = null;
Utils.changeTheme = function (sValue, sHash, themeTrigger, Links)
Utils.changeTheme = function (sValue, themeTrigger)
{
var
oThemeLink = $('#rlThemeLink'),
@ -1673,26 +1673,6 @@
}
}
if (Links)
{
var $oBg = $('#rl-bg');
if (!sHash)
{
if ($oBg.data('backstretch'))
{
$oBg.backstretch('destroy').attr('style', '');
}
}
else
{
$oBg.backstretch(Links.publicLink(sHash), {
'fade': Globals.bAnimationSupported ? 1000 : 0,
'centeredX': true,
'centeredY': true
});
}
}
themeTrigger(Enums.SaveSettingsStep.TrueResult);
}