nextcloud/core/js/avatar.js

21 lines
600 B
JavaScript
Raw Normal View History

2013-08-29 16:26:11 +04:00
$(document).ready(function(){
if (OC.currentUser) {
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');
}
};
2014-03-01 05:46:27 +04:00
$('#header .avatardiv').avatar(
OC.currentUser, 32, undefined, true, callback
);
// Personal settings
$('#avatar .avatardiv').avatar(OC.currentUser, 128);
}
2013-08-29 16:26:11 +04:00
// User settings
$.each($('td.avatar .avatardiv'), function(i, element) {
$(element).avatar($(element).parent().parent().data('uid'), 32);
2013-08-29 16:26:11 +04:00
});
});