diff options
author | kondou <kondou@ts.unde.re> | 2013-08-28 21:20:28 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-28 21:20:28 +0200 |
commit | bdf48a6daa8234b307bb7b73a231de5227e10b30 (patch) | |
tree | c13ff6f3eafcf63fee21fd4cabd86643824606a6 /settings | |
parent | 67c5be9f199c08ac4c9307901e8e6cc678943f05 (diff) | |
download | nextcloud-server-bdf48a6daa8234b307bb7b73a231de5227e10b30.tar.gz nextcloud-server-bdf48a6daa8234b307bb7b73a231de5227e10b30.zip |
Use OC.Router.generate, TODO use cache, prepare for defaultavatars
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 8 | ||||
-rw-r--r-- | settings/personal.php | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index 5d9219dd7e5..e873eb1336e 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -45,7 +45,7 @@ function changeDisplayName(){ } function selectAvatar (path) { - $.post(OC.router_base_url+'/avatar/', {path: path}, avatarResponseHandler); + $.post(OC.Router.generate('core_avatar_post'), {path: path}, avatarResponseHandler); } function updateAvatar () { @@ -74,7 +74,7 @@ function showAvatarCropper() { onSelect: saveCoords, aspectRatio: 1 }); - }).attr('src', OC.router_base_url+'/avatartmp/512'); + }).attr('src', OC.Router.generate('core_avatar_get_tmp', {size: 512})); } function sendCropData() { @@ -86,7 +86,7 @@ function sendCropData() { w: cropperdata.w, h: cropperdata.h }; - $.post(OC.router_base_url+'/avatar/cropped', {crop: data}, avatarResponseHandler); + $.post(OC.Router.generate('core_avatar_post_cropped'), {crop: data}, avatarResponseHandler); } function saveCoords(c) { @@ -214,7 +214,7 @@ $(document).ready(function(){ $('#removeavatar').click(function(){ $.ajax({ type: 'DELETE', - url: OC.router_base_url+'/avatar/', + url: OC.Router.generate('core_avatar_delete'), success: function(msg) { updateAvatar(); } diff --git a/settings/personal.php b/settings/personal.php index b0d62645d5a..c54fad28e1f 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -18,6 +18,8 @@ OC_Util::addStyle( '3rdparty', 'chosen' ); \OC_Util::addScript('files', 'jquery.fileupload'); \OC_Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop.min'); \OC_Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop.min'); +//OC_Util::addScript('3rdparty', 'md5/md5.min'); +//OC_Util::addScript('core', 'placeholder'); OC_App::setActiveNavigationEntry( 'personal' ); $storageInfo=OC_Helper::getStorageInfo('/'); |