mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Uploading and preparing the repository to the dev version.
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
This commit is contained in:
parent
afad45137e
commit
4cc2207513
846 changed files with 99453 additions and 2123 deletions
67
dev/Storages/AbstractCache.js
Normal file
67
dev/Storages/AbstractCache.js
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AbstractCacheStorage()
|
||||
{
|
||||
this.oEmailsPicsHashes = {};
|
||||
this.oServices = {};
|
||||
}
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
AbstractCacheStorage.prototype.oEmailsPicsHashes = {};
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
AbstractCacheStorage.prototype.oServices = {};
|
||||
|
||||
AbstractCacheStorage.prototype.clear = function ()
|
||||
{
|
||||
this.oServices = {};
|
||||
this.oEmailsPicsHashes = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sEmail
|
||||
* @return {string}
|
||||
*/
|
||||
AbstractCacheStorage.prototype.getUserPic = function (sEmail)
|
||||
{
|
||||
var
|
||||
sUrl = '',
|
||||
sService = '',
|
||||
sEmailLower = sEmail.toLowerCase(),
|
||||
sPicHash = Utils.isUnd(this.oEmailsPicsHashes[sEmail]) ? '' : this.oEmailsPicsHashes[sEmail]
|
||||
;
|
||||
|
||||
if ('' === sPicHash)
|
||||
{
|
||||
sService = sEmailLower.substr(sEmail.indexOf('@') + 1);
|
||||
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
sUrl = RL.link().getUserPicUrlFromHash(sPicHash);
|
||||
}
|
||||
|
||||
return sUrl;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oData
|
||||
*/
|
||||
AbstractCacheStorage.prototype.setServicesData = function (oData)
|
||||
{
|
||||
this.oServices = oData;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Object} oData
|
||||
*/
|
||||
AbstractCacheStorage.prototype.setEmailsPicsHashesData = function (oData)
|
||||
{
|
||||
this.oEmailsPicsHashes = oData;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue