Remove OC.Router usage

This commit is contained in:
kondou 2014-03-12 15:31:48 +01:00
parent 1c82b4751e
commit dd97d532be

View File

@ -284,13 +284,14 @@ $(document).ready(function(){
// does the user have a custom avatar? if he does hide #removeavatar // does the user have a custom avatar? if he does hide #removeavatar
// needs to be this complicated because we can't check yet if an avatar has been loaded, because it's async // needs to be this complicated because we can't check yet if an avatar has been loaded, because it's async
OC.Router.registerLoadedCallback(function() { var url = OC.generateUrl(
var url = OC.Router.generate('core_avatar_get', {user: OC.currentUser, size: 1})+'?requesttoken='+oc_requesttoken; '/avatar/{user}/{size}',
$.get(url, function(result) { {user: OC.currentUser, size: 1}
if (typeof(result) === 'object') { ) + '?requesttoken=' + oc_requesttoken;
$('#removeavatar').addClass('hidden'); $.get(url, function(result) {
} if (typeof(result) === 'object') {
}); $('#removeavatar').addClass('hidden');
}
}); });
} ); } );