[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.
This commit is contained in:
Nicolas Martinelli
2019-08-08 07:09:57 +00:00
parent 32c2666d18
commit 625e2f06be
@@ -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);
}
});
},