diff options
author | kondou <kondou@ts.unde.re> | 2014-03-12 15:31:48 +0100 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2014-03-12 15:31:48 +0100 |
commit | dd97d532beda0a32121f3faa2fae92508284a326 (patch) | |
tree | c78cd3d30a3311d745530d07752fd93b4414d1e2 /settings/js/personal.js | |
parent | 1c82b4751ecb69ed1f0973b3cde0a255daaf9747 (diff) | |
download | nextcloud-server-dd97d532beda0a32121f3faa2fae92508284a326.tar.gz nextcloud-server-dd97d532beda0a32121f3faa2fae92508284a326.zip |
Remove OC.Router usage
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index 26c50f8fa5d..fe8c21aa4f1 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -284,13 +284,14 @@ $(document).ready(function(){ // 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 - OC.Router.registerLoadedCallback(function() { - var url = OC.Router.generate('core_avatar_get', {user: OC.currentUser, size: 1})+'?requesttoken='+oc_requesttoken; - $.get(url, function(result) { - if (typeof(result) === 'object') { - $('#removeavatar').addClass('hidden'); - } - }); + var url = OC.generateUrl( + '/avatar/{user}/{size}', + {user: OC.currentUser, size: 1} + ) + '?requesttoken=' + oc_requesttoken; + $.get(url, function(result) { + if (typeof(result) === 'object') { + $('#removeavatar').addClass('hidden'); + } }); } ); |