Fix newly uploaded avatar can not be saved

This commit is contained in:
Hadi Nategh 2022-07-12 10:35:11 +02:00
parent 5cd979d372
commit 894767ac21

View File

@ -555,7 +555,7 @@ export class et2_avatar extends et2_image
dialog.transformAttributes({
callback: function(_buttons, _value)
{
if(_buttons == 'save')
if(_buttons == 1)
{
let canvas = jQuery('#_cropper_image').cropper('getCroppedCanvas');
self.image.attr('src', canvas.toDataURL("image/jpeg", 1.0));
@ -617,8 +617,6 @@ export class et2_avatar extends et2_image
// invisible the mask
eml.css('opacity','0');
eml.parent().css('position', "relative");
// bind handler for activating actions on editable mask
eml.on({
mouseover:function(){eml.css('opacity','0.9');},