[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>
This commit is contained in:
committed by
Pierre Paridans
parent
aaa7cfa535
commit
49c46b0bb4
@@ -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', {
|
||||
|
||||
Reference in New Issue
Block a user