diff --git a/api/js/etemplate/et2_widget_image.js b/api/js/etemplate/et2_widget_image.js index 652137d2c0..d27d74f38b 100644 --- a/api/js/etemplate/et2_widget_image.js +++ b/api/js/etemplate/et2_widget_image.js @@ -412,6 +412,8 @@ var et2_avatar = /** @class */ (function (_super) { et2_avatar.prototype._buildEditableLayer = function (_noDelete) { var self = this; // editable mask layer (eml) + var wrapper = jQuery(document.createElement('div')).addClass('avatar').insertAfter(this.image); + this.image.appendTo(wrapper); var eml = jQuery(document.createElement('div')) .addClass('eml') .insertAfter(this.image); @@ -448,7 +450,7 @@ var et2_avatar = /** @class */ (function (_super) { template: egw.webserverUrl + '/api/templates/default/avatar_edit.xet?2' }, et2_dialog._create_parent(_egw_or_appname)); }; - dialog(egw.lang('Edit avatar'), { photo: self.options.contact_id }, buttons, null); + dialog(egw.lang('Edit avatar'), self.options, buttons, null); }) .appendTo(eml); // delete button diff --git a/api/js/etemplate/et2_widget_image.ts b/api/js/etemplate/et2_widget_image.ts index 4d39831f25..08034f7772 100644 --- a/api/js/etemplate/et2_widget_image.ts +++ b/api/js/etemplate/et2_widget_image.ts @@ -531,6 +531,8 @@ class et2_avatar extends et2_image { let self = this; // editable mask layer (eml) + let wrapper = jQuery(document.createElement('div')).addClass('avatar').insertAfter(this.image); + this.image.appendTo(wrapper); let eml = jQuery(document.createElement('div')) .addClass('eml') .insertAfter(this.image); @@ -577,7 +579,7 @@ class et2_avatar extends et2_image }, et2_dialog._create_parent(_egw_or_appname)); }; - dialog(egw.lang('Edit avatar'),{photo:self.options.contact_id}, buttons, null); + dialog(egw.lang('Edit avatar'),self.options, buttons, null); }) .appendTo(eml); diff --git a/api/templates/default/avatar_edit.xet b/api/templates/default/avatar_edit.xet index 5bf9851cd7..e279a48299 100644 --- a/api/templates/default/avatar_edit.xet +++ b/api/templates/default/avatar_edit.xet @@ -4,7 +4,7 @@