diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-22 15:00:12 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-23 01:17:38 +0200 |
commit | fb9ef90c45d9993febc4c9481f6b74ca8f467d73 (patch) | |
tree | c0020c066e6b9ee261b78b624c2ec1f63f273c75 /apps | |
parent | 0439a1832466cf1b2dce067c16bc30fa6378ef3b (diff) | |
download | nextcloud-server-fb9ef90c45d9993febc4c9481f6b74ca8f467d73.tar.gz nextcloud-server-fb9ef90c45d9993febc4c9481f6b74ca8f467d73.zip |
No need to set checksum on PHOTO.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/js/contacts.js | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index db089b8d237..d33f16e4e93 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1208,28 +1208,17 @@ Contacts={ $('#phototools li a').tipsy('hide'); var wrapper = $('#contacts_details_photo_wrapper'); wrapper.addClass('loading').addClass('wait'); - - var img = new Image(); - $(img).load(function () { + delete this.photo; + this.photo = new Image(); + $(this.photo).load(function () { $('img.contacts_details_photo').remove() - $(this).addClass('contacts_details_photo').hide(); + $(this).addClass('contacts_details_photo'); wrapper.removeClass('loading').removeClass('wait'); $(this).insertAfter($('#phototools')).fadeIn(); }).error(function () { // notify the user that the image could not be loaded Contacts.UI.notify({message:t('contacts','Error loading profile picture.')}); }).attr('src', OC.linkTo('contacts', 'photo.php')+'?id='+self.id+refreshstr); - - $.getJSON(OC.filePath('contacts', 'ajax', 'loadphoto.php'),{'id':this.id, 'refresh': refresh},function(jsondata){ - if(jsondata.status == 'success'){ - $('#contacts_details_photo_wrapper').data('checksum', jsondata.data.checksum); - Contacts.UI.Card.loadPhotoHandlers(); - } - else{ - OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); - } - }); - $('#file_upload_form').show(); }, editCurrentPhoto:function(){ $.getJSON(OC.filePath('contacts', 'ajax', 'currentphoto.php'),{'id':this.id},function(jsondata){ |