summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/activity.js
diff options
context:
space:
mode:
authorRomeo Fragomeli <rfr@odoo.com>2020-02-20 11:01:24 +0000
committerPierre Paridans <app@odoo.com>2020-02-20 16:56:13 +0000
commit49c46b0bb47fcf459b0e8d72c7593e860b9bbbc4 (patch)
treedd0892f63c5c8346e15a95ad3cbbbc190e58c971 /addons/mail/static/src/js/activity.js
parentaaa7cfa535f06aead908fa9cb9e54b5099cc713c (diff)
[FIX] mail: activity popup is outside the screen
Before this commit, the popup activity in kanban was rendered using the position of the button. So the left popup was nearly in the center of the screen but the width is too large to be contained on the screen. After this commit, in mobile, the popup activity in kanban will be placed on the left of the button to avoid to go outside of the viewport. Steps to reproduce: * Go to sale app (in mobile) * Click on the activity button of a kanban card (clock icon) BUG Task ID: 2198429 closes odoo/odoo#45860 X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Diffstat (limited to 'addons/mail/static/src/js/activity.js')
-rw-r--r--addons/mail/static/src/js/activity.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/activity.js b/addons/mail/static/src/js/activity.js
index 5596e407c09..07c60f513b8 100644
--- a/addons/mail/static/src/js/activity.js
+++ b/addons/mail/static/src/js/activity.js
@@ -5,6 +5,7 @@ var mailUtils = require('mail.utils');
var AbstractField = require('web.AbstractField');
var BasicModel = require('web.BasicModel');
+var config = require('web.config');
var core = require('web.core');
var field_registry = require('web.field_registry');
var session = require('web.session');
@@ -711,7 +712,9 @@ var KanbanActivity = BasicActivity.extend({
*/
_renderDropdown: function () {
var self = this;
- this.$('.o_activity').html(QWeb.render('mail.KanbanActivityLoading'));
+ this.$('.o_activity')
+ .toggleClass('dropdown-menu-right', config.device.isMobile)
+ .html(QWeb.render('mail.KanbanActivityLoading'));
return _readActivities(this, this.value.res_ids).then(function (activities) {
activities = setFileUploadID(activities);
self.$('.o_activity').html(QWeb.render('mail.KanbanActivityDropdown', {