summaryrefslogtreecommitdiffstats
path: root/settings/js/personal.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-03 18:34:40 +0200
committerkondou <kondou@ts.unde.re>2013-09-03 18:34:40 +0200
commit6d42f51d0cf389f746f327bd20374f151f1057cb (patch)
tree5efc77732f4ca35ec0ca2037829459997c07e7bc /settings/js/personal.js
parent4724d60ecd600cd778e1bb9bc56888df290887db (diff)
downloadnextcloud-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.js13
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(){