Small changes

This commit is contained in:
RainLoop Team 2014-05-27 20:00:22 +04:00
parent 919fd19f8f
commit c6a9563d81
6 changed files with 46 additions and 13 deletions

View file

@ -247,6 +247,16 @@ LinkBuilder.prototype.emptyContactPic = function ()
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @return {string}
*/
LinkBuilder.prototype.emptyFullContactPic = function ()
{
return window.location.protocol + '//' + window.location.hostname +
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @param {string} sFileName
* @return {string}

View file

@ -56,10 +56,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
if (this.bCapaGravatar && '' === sUrl)
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
}
else
{

View file

@ -3752,6 +3752,16 @@ LinkBuilder.prototype.emptyContactPic = function ()
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @return {string}
*/
LinkBuilder.prototype.emptyFullContactPic = function ()
{
return window.location.protocol + '//' + window.location.hostname +
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @param {string} sFileName
* @return {string}
@ -7788,10 +7798,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
if (this.bCapaGravatar && '' === sUrl)
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
}
else
{

File diff suppressed because one or more lines are too long

View file

@ -3756,6 +3756,16 @@ LinkBuilder.prototype.emptyContactPic = function ()
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @return {string}
*/
LinkBuilder.prototype.emptyFullContactPic = function ()
{
return window.location.protocol + '//' + window.location.hostname +
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
};
/**
* @param {string} sFileName
* @return {string}
@ -17883,10 +17893,11 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
sUrl = '' !== sService && this.oServices[sService] ? this.oServices[sService] : '';
}
if (this.bCapaGravatar && '' === sUrl)
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
{
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
}
else
{

File diff suppressed because one or more lines are too long