diff options
| author | Robot Odoo <xmo+roboto@odoo.com> | 2019-08-02 20:36:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 20:36:51 +0200 |
| commit | 6df11fc42d965940e3dcdd64b5a197a60bb6f4e4 (patch) | |
| tree | eee38b8192d49fc2c3525b5ce21b80d9d3acc500 /addons/mail/static/src/js | |
| parent | ec32fd54595614ee8763ba82c5862d79a3e21897 (diff) | |
| parent | 45e3be94c0095b0814690de3cac9ab56afe32368 (diff) | |
[MERGE] *: rename image fields and use image.mixin
Merge commit for PR #34925
Related enterprise PR odoo/enterprise/pull/4865
The goal is to:
- Use `image.mixin` on the models currently storing multiple image sizes.
- Create Image field and use it on models where mixin is overkill.
- Rename the image fields to contain the pixel number in the name.
- Add 512 size.
- Clean up `image.mixin`, zoom field, variant fields.
Note: models that currently store only a single size image will not be changed
in this PR.
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/mail/static/src/js')
5 files changed, 6 insertions, 6 deletions
diff --git a/addons/mail/static/src/js/composers/basic_composer.js b/addons/mail/static/src/js/composers/basic_composer.js index 2a496faf86d..d79a7c93028 100644 --- a/addons/mail/static/src/js/composers/basic_composer.js +++ b/addons/mail/static/src/js/composers/basic_composer.js @@ -100,7 +100,7 @@ var BasicComposer = Widget.extend({ this.avatarURL = session.uid > 0 ? session.url('/web/image', { model: 'res.users', - field: 'image_small', + field: 'image_64', id: session.uid, }) : '/web/static/src/img/user_menu_avatar.png'; }, diff --git a/addons/mail/static/src/js/followers.js b/addons/mail/static/src/js/followers.js index 751187608ae..b6dc5ff6996 100644 --- a/addons/mail/static/src/js/followers.js +++ b/addons/mail/static/src/js/followers.js @@ -36,7 +36,7 @@ var Followers = AbstractField.extend({ init: function (parent, name, record, options) { this._super.apply(this, arguments); - this.image = this.attrs.image || 'image_small'; + this.image = this.attrs.image || 'image_64'; this.comment = this.attrs.help || false; this.followers = []; @@ -120,7 +120,7 @@ var Followers = AbstractField.extend({ } $follower_li = $(QWeb.render('mail.Followers.partner', { - 'record': _.extend(record, {'avatar_url': '/web/image/' + record.res_model + '/' + record.res_id + '/image_small'}), + 'record': _.extend(record, {'avatar_url': '/web/image/' + record.res_model + '/' + record.res_id + '/image_64'}), 'widget': self}) ); $follower_li.appendTo($followers_list); diff --git a/addons/mail/static/src/js/models/messages/message.js b/addons/mail/static/src/js/models/messages/message.js index f93209a913f..d22569461e5 100644 --- a/addons/mail/static/src/js/models/messages/message.js +++ b/addons/mail/static/src/js/models/messages/message.js @@ -94,7 +94,7 @@ var Message = AbstractMessage.extend(Mixins.EventDispatcherMixin, ServicesMixin if (this._isOdoobotAuthor()) { return '/mail/static/src/img/odoobot.png'; } else if (this.hasAuthor()) { - return '/web/image/res.partner/' + this.getAuthorID() + '/image_small'; + return '/web/image/res.partner/' + this.getAuthorID() + '/image_64'; } else if (this.getType() === 'email') { return '/mail/static/src/img/email_icon.png'; } diff --git a/addons/mail/static/src/js/models/threads/channel.js b/addons/mail/static/src/js/models/threads/channel.js index 9e9f3ac6a39..83a0a259e94 100644 --- a/addons/mail/static/src/js/models/threads/channel.js +++ b/addons/mail/static/src/js/models/threads/channel.js @@ -220,7 +220,7 @@ var Channel = SearchableThread.extend(ThreadTypingMixin, { getPreview: function () { var result = this._super.apply(this, arguments); if (!this.isTwoUserThread()) { - result.imageSRC = '/web/image/mail.channel/' + this.getID() + '/image_small'; + result.imageSRC = '/web/image/mail.channel/' + this.getID() + '/image_128'; } var lastMessage = this.getLastMessage(); return _.extend(result, { diff --git a/addons/mail/static/src/js/models/threads/dm_chat.js b/addons/mail/static/src/js/models/threads/dm_chat.js index 78cc01a7044..b53637e614b 100644 --- a/addons/mail/static/src/js/models/threads/dm_chat.js +++ b/addons/mail/static/src/js/models/threads/dm_chat.js @@ -91,7 +91,7 @@ var DMChat = TwoUserChannel.extend(ChannelSeenMixin, { */ getPreview: function () { var result = this._super.apply(this, arguments); - result.imageSRC = '/web/image/res.partner/' + this.getDirectPartnerID() + '/image_small'; + result.imageSRC = '/web/image/res.partner/' + this.getDirectPartnerID() + '/image_64'; return result; }, /** |
