diff options
-rw-r--r-- | core/routes.php | 4 | ||||
-rw-r--r-- | core/templates/layout.user.php | 1 | ||||
-rw-r--r-- | settings/js/personal.js | 14 |
3 files changed, 10 insertions, 9 deletions
diff --git a/core/routes.php b/core/routes.php index a0d06bf807e..9cedcb0956c 100644 --- a/core/routes.php +++ b/core/routes.php @@ -60,8 +60,8 @@ $this->create('core_lostpassword_reset_password', '/lostpassword/reset/{token}/{ // Avatar routes $this->create('core_avatar_get_tmp', '/avatar/tmp') - ->get() - ->action('OC_Core_Avatar_Controller', 'getTmpAvatar'); + ->get() + ->action('OC_Core_Avatar_Controller', 'getTmpAvatar'); $this->create('core_avatar_get', '/avatar/{user}/{size}') ->get() ->action('OC_Core_Avatar_Controller', 'getAvatar'); diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index e95d1b1d97d..cd303104e0c 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -45,7 +45,6 @@ <a href="<?php print_unescaped(link_to('', 'index.php')); ?>" title="" id="owncloud"><img class="svg" src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a> <div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div> - <ul id="settings" class="svg"> <span id="expand" tabindex="0" role="link"> <span id="expandDisplayName"><?php p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span> 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(){ |