diff options
author | kondou <kondou@ts.unde.re> | 2013-08-31 19:05:53 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-31 19:05:53 +0200 |
commit | 385de45ed9cbc55c92cb551cfe2e4d309eacd687 (patch) | |
tree | 8313ceedb8bd7242723dc31271857fdc47969691 /core/js/jquery.avatar.js | |
parent | aa88eea9cf366c07b0a311adc5ee64f0ae86ff33 (diff) | |
download | nextcloud-server-385de45ed9cbc55c92cb551cfe2e4d309eacd687.tar.gz nextcloud-server-385de45ed9cbc55c92cb551cfe2e4d309eacd687.zip |
Deal with OC.Router.generate()
Diffstat (limited to 'core/js/jquery.avatar.js')
-rw-r--r-- | core/js/jquery.avatar.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index b4fa524f47a..847d5b45d2d 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -34,13 +34,13 @@ var $div = this; - //$.get(OC.Router.generate('core_avatar_get', {user: user, size: size}), function(result) { // TODO does not work "Uncaught TypeError: Cannot use 'in' operator to search for 'core_avatar_get' in undefined" router.js L22 - $.get(OC.router_base_url+'/avatar/'+user+'/'+size, function(result) { + var url = OC.router_base_url+'/avatar/'+user+'/'+size // FIXME routes aren't loaded yet, so OC.Router.generate() doesn't work + $.get(url, function(result) { if (typeof(result) === 'object') { $div.placeholder(result.user); } else { - $div.html('<img src="'+OC.Router.generate('core_avatar_get', {user: user, size: size})+'">'); + $div.html('<img src="'+url+'">'); } }); - }; + }; }(jQuery)); |