diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
commit | 1291303c5a312fad9f01fbaf22cc21e3b9b3675d (patch) | |
tree | c1e46efc7589c3101a8c3806ecc3112c8f3e2849 /settings/js/personal.js | |
parent | 88c9ae129e7dcc0e10aee682c8d4fa31b93b614c (diff) | |
download | nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.tar.gz nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.zip |
Replace OC.Router.generate() with OC.generateUrl()
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 10 |
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); } |