diff options
author | kondou <kondou@ts.unde.re> | 2013-09-04 12:56:14 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-04 12:56:14 +0200 |
commit | a1e7614d73c1a640521dfb2410349703c9afdc15 (patch) | |
tree | 720de01baf316451ee57d9e5e50c4bb7cfe3699c /settings | |
parent | 32a7ba9823b6afdfeb96dcfe5ab890aa1e39b7fd (diff) | |
download | nextcloud-server-a1e7614d73c1a640521dfb2410349703c9afdc15.tar.gz nextcloud-server-a1e7614d73c1a640521dfb2410349703c9afdc15.zip |
Clean up oc_avatars
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index fb542f03c51..8e7a71e2597 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -44,10 +44,6 @@ function changeDisplayName(){ } } -function selectAvatar (path) { - $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler); -} - function updateAvatar () { $('#header .avatardiv').avatar(OC.currentUser, 32, true); $('#displayavatar .avatardiv').avatar(OC.currentUser, 128, true); @@ -89,7 +85,6 @@ function sendCropData() { w: cropperdata.w, h: cropperdata.h }; - $('#cropperbox').remove(); $.post(OC.Router.generate('core_avatar_post_cropped'), {crop: data}, avatarResponseHandler); } @@ -207,7 +202,14 @@ $(document).ready(function(){ $('#uploadavatar').fileupload(uploadparms); $('#selectavatar').click(function(){ - OC.dialogs.filepicker(t('settings', "Select a profile picture"), selectAvatar, false, "image"); + OC.dialogs.filepicker( + t('settings', "Select a profile picture"), + function(){ + $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler); + }, + false, + "image" + ); }); $('#removeavatar').click(function(){ |