$('#header .avatardiv').addClass('avatardiv-shown');
}
$displaydiv.css({'background-color': ''});
- $displaydiv.avatar(OC.currentUser, 145, true);
+ $displaydiv.avatar(OC.currentUser, 145, true, null, function() {
+ $displaydiv.removeClass('loading');
+ $('#displayavatar img').show();
+ });
$.get(OC.generateUrl(
'/avatar/{user}/{size}',
{
// Looks weird, but on('load', ...) doesn't work in IE8
$cropperImage.ready(function () {
- $('#displayavatar').hide();
$cropperImage.Jcrop({
onChange: saveCoords,
avatarResponseHandler(response);
},
submit: function(e, data) {
+ $('#displayavatar img').hide();
+ $('#displayavatar .avatardiv').addClass('loading');
data.formData = _.extend(data.formData || {}, {
requesttoken: OC.requestToken
});
OC.dialogs.filepicker(
t('settings', "Select a profile picture"),
function (path) {
+ $('#displayavatar img').hide();
+ $('#displayavatar .avatardiv').addClass('loading');
$.ajax({
type: "POST",
url: OC.generateUrl('/avatar/'),
});
$('#abortcropperbutton').click(function () {
+ $('#displayavatar .avatardiv').removeClass('loading');
+ $('#displayavatar img').show();
cleanCropper();
});