2013-08-29 12:26:11 +00:00
|
|
|
$(document).ready(function(){
|
2013-09-17 17:25:03 +00:00
|
|
|
if (OC.currentUser) {
|
2014-02-20 12:37:23 +00:00
|
|
|
var callback = function() {
|
|
|
|
// do not show display name on mobile when profile picture is present
|
|
|
|
if($('#header .avatardiv').children().length > 0) {
|
|
|
|
$('#header .avatardiv').addClass('avatardiv-shown');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$('#header .avatardiv').avatar(OC.currentUser, 32, undefined, true, callback);
|
2013-09-17 17:25:03 +00:00
|
|
|
// Personal settings
|
|
|
|
$('#avatar .avatardiv').avatar(OC.currentUser, 128);
|
|
|
|
}
|
2013-08-29 12:26:11 +00:00
|
|
|
// User settings
|
2013-09-01 14:04:39 +00:00
|
|
|
$.each($('td.avatar .avatardiv'), function(i, element) {
|
|
|
|
$(element).avatar($(element).parent().parent().data('uid'), 32);
|
2013-08-29 12:26:11 +00:00
|
|
|
});
|
|
|
|
});
|