Clean up oc_avatars

This commit is contained in:
kondou 2013-09-04 12:56:14 +02:00
parent 32a7ba9823
commit a1e7614d73
3 changed files with 10 additions and 9 deletions

View File

@ -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');

View File

@ -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>

View File

@ -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(){