summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-08-06 13:14:32 +0000
committerNicolas Martinelli <nim@odoo.com>2019-08-08 07:09:57 +0000
commit625e2f06be2582b6f8d983d7e25a6c8f73102424 (patch)
tree2fbd13743d20efd55fbe54a74ba2eaa70747f710 /addons/web/static/src
parent32c2666d189047db66eb7b1392ea34b086fd341e (diff)
[FIX] web: kanban swipe in RTL
- Set a language using RTL (e.g. Arabic) - Activate mobile mode (through debug mode or on a mobile device) - Go to a grouped kanban view (e.g. CRM pipeline) - Swipe to the left The column to the left if shown instead of the column to the right. In RTL, the kanban groups order are inverted. Therefore, we also need to invert the swipe direction.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_renderer_mobile.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_renderer_mobile.js b/addons/web/static/src/js/views/kanban/kanban_renderer_mobile.js
index 8619448e793..3961805c41e 100644
--- a/addons/web/static/src/js/views/kanban/kanban_renderer_mobile.js
+++ b/addons/web/static/src/js/views/kanban/kanban_renderer_mobile.js
@@ -112,12 +112,13 @@ KanbanRenderer.include({
_enableSwipe: function () {
var self = this;
var currentColumn = this.widgets[this.activeColumnIndex];
+ var step = _t.database.parameters.direction === 'rtl' ? -1 : 1;
currentColumn.$el.swipe({
swipeLeft: function () {
- self._moveToGroup(self.activeColumnIndex + 1, self.ANIMATE);
+ self._moveToGroup(self.activeColumnIndex + step, self.ANIMATE);
},
swipeRight: function () {
- self._moveToGroup(self.activeColumnIndex - 1, self.ANIMATE);
+ self._moveToGroup(self.activeColumnIndex - step, self.ANIMATE);
}
});
},