summaryrefslogtreecommitdiffstats
path: root/settings/js/personal.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r--settings/js/personal.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 98bfe7132d4..7a4257f1c97 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -67,7 +67,7 @@ function showAvatarCropper() {
$cropper.prepend("<img>");
$cropperImage = $('#cropper img');
- $cropperImage.attr('src', OC.Router.generate('core_avatar_get_tmp')+'?requesttoken='+oc_requesttoken+'#'+Math.floor(Math.random()*1000));
+ $cropperImage.attr('src', OC.generateUrl('/avatar/tmp')+'?requesttoken='+oc_requesttoken+'#'+Math.floor(Math.random()*1000));
// Looks weird, but on('load', ...) doesn't work in IE8
$cropperImage.ready(function(){
@@ -95,7 +95,7 @@ function sendCropData() {
w: cropperdata.w,
h: cropperdata.h
};
- $.post(OC.Router.generate('core_avatar_post_cropped'), {crop: data}, avatarResponseHandler);
+ $.post(OC.generateUrl('/avatar/cropped'), {crop: data}, avatarResponseHandler);
}
function saveCoords(c) {
@@ -132,7 +132,7 @@ $(document).ready(function(){
$('#passwordchanged').hide();
$('#passworderror').hide();
// Ajax foo
- $.post(OC.Router.generate('settings_personal_changepassword'), post, function(data){
+ $.post(OC.generateUrl('/settings/personal/changepassword'), post, function(data){
if( data.status === "success" ){
$('#pass1').val('');
$('#pass2').val('');
@@ -243,7 +243,7 @@ $(document).ready(function(){
OC.dialogs.filepicker(
t('settings', "Select a profile picture"),
function(path){
- $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler);
+ $.post(OC.generateUrl('/avatar/'), {path: path}, avatarResponseHandler);
},
false,
["image/png", "image/jpeg"]
@@ -253,7 +253,7 @@ $(document).ready(function(){
$('#removeavatar').click(function(){
$.ajax({
type: 'DELETE',
- url: OC.Router.generate('core_avatar_delete'),
+ url: OC.generateUrl('/avatar/'),
success: function(msg) {
updateAvatar(true);
}