diff options
author | kondou <kondou@ts.unde.re> | 2013-09-03 18:34:40 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-03 18:34:40 +0200 |
commit | 6d42f51d0cf389f746f327bd20374f151f1057cb (patch) | |
tree | 5efc77732f4ca35ec0ca2037829459997c07e7bc /settings/js/personal.js | |
parent | 4724d60ecd600cd778e1bb9bc56888df290887db (diff) | |
download | nextcloud-server-6d42f51d0cf389f746f327bd20374f151f1057cb.tar.gz nextcloud-server-6d42f51d0cf389f746f327bd20374f151f1057cb.zip |
Fix unwanted caching in IE8
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index f60ab72f8e6..e546e707ea5 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -50,15 +50,15 @@ function selectAvatar (path) { } function updateAvatar () { - $('header .avatardiv').avatar(OC.currentUser, 32); - $('#avatar .avatardiv').avatar(OC.currentUser, 128); + $('#header .avatardiv').avatar(OC.currentUser, 32, true); + $('#displayavatar .avatardiv').avatar(OC.currentUser, 128, true); } function showAvatarCropper() { $cropper = $('#cropper'); $cropperImage = $('#cropper img'); - $cropperImage.attr('src', OC.Router.generate('core_avatar_get_tmp')); + $cropperImage.attr('src', OC.Router.generate('core_avatar_get_tmp')+'#'+Math.floor(Math.random()*1000)); // Looks weird, but on('load', ...) doesn't work in IE8 $cropperImage.ready(function(){ @@ -77,8 +77,11 @@ function showAvatarCropper() { } function sendCropData() { + $cropper = $('#cropper'); $('#displayavatar').show(); $cropper.hide(); + $('.jcrop-holder').remove(); + $('#cropper img').removeData('Jcrop').removeAttr('style').removeAttr('src'); var cropperdata = $('#cropper').data(); var data = { @@ -220,7 +223,9 @@ $(document).ready(function(){ $('#abortcropperbutton').click(function(){ $('#displayavatar').show(); - $cropper.hide(); + $('#cropper').hide(); + $('.jcrop-holder').remove(); + $('#cropper img').removeData('Jcrop').removeAttr('style').removeAttr('src'); }); $('#sendcropperbutton').click(function(){ |