mirror of
https://github.com/nextcloud/server.git
synced 2024-08-12 14:11:31 +02:00
Remove OC.Router usage
This commit is contained in:
parent
1c82b4751e
commit
dd97d532be
@ -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');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user