Revert "[FIX] web: empty kanban view on mobile"
Original commit breaking kanban view:4cd379cf6eCommit reverted:287136b85eTwo fixes were added independently to fix this bug but only one is needed. odoo/enterprise@c8fe86fa22 best fix287136b85eother fix (now reverted) Reverting this commit fix the following bugs: - Swipe on kanban : Not able to swipe on empty column. it only works on cards - Popup activity on kanban card is unusable - On kanban separation, "Undefined" cards are before the kanban separation closes odoo/odoo#30177
This commit is contained in:
committed by
Adrien Dieudonne
parent
38068f8151
commit
c72e5a8bc5
@@ -143,7 +143,7 @@ KanbanRenderer.include({
|
||||
onSuccess: function () {
|
||||
// update the columns and tabs positions (optionally with an animation)
|
||||
var updateFunc = animate ? 'animate' : 'css';
|
||||
self.$('.o_kanban_mobile_tab, .o_kanban_group').removeClass('o_current');
|
||||
self.$('.o_kanban_mobile_tab').removeClass('o_current');
|
||||
_.each(self.widgets, function (column, index) {
|
||||
var columnID = column.id || column.db_id;
|
||||
var $column = self.$('.o_kanban_group[data-id="' + columnID + '"]');
|
||||
@@ -157,7 +157,6 @@ KanbanRenderer.include({
|
||||
} else if (index === moveToIndex) {
|
||||
$column[updateFunc]({left: '0%'});
|
||||
$tab[updateFunc]({left: '50%'});
|
||||
$column.addClass('o_current');
|
||||
$tab.addClass('o_current');
|
||||
} else if (index < moveToIndex) {
|
||||
$column.css({left: '-100%'});
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
margin-left: 0; // override the margin-left: -1px of the desktop mode
|
||||
border: none;
|
||||
|
||||
&.o_current {
|
||||
position: initial;
|
||||
}
|
||||
.o_kanban_header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ QUnit.module('Views', {
|
||||
QUnit.module('KanbanView Mobile');
|
||||
|
||||
QUnit.test('mobile grouped rendering', function (assert) {
|
||||
assert.expect(11);
|
||||
assert.expect(9);
|
||||
|
||||
var kanban = createView({
|
||||
View: KanbanView,
|
||||
@@ -75,8 +75,6 @@ QUnit.module('Views', {
|
||||
assert.containsN(kanban, '.o_kanban_group', 2, "should have 2 columns" );
|
||||
assert.hasClass(kanban.$('.o_kanban_mobile_tab:first'),'o_current',
|
||||
"first tab is the active tab with class 'o_current'");
|
||||
assert.hasClass(kanban.$('.o_kanban_group:first'),'o_current',
|
||||
"first column is the active column with class 'o_current'");
|
||||
assert.containsN(kanban, '.o_kanban_group:first > div.o_kanban_record', 2,
|
||||
"there are 2 records in active tab");
|
||||
assert.strictEqual(kanban.$('.o_kanban_group:nth(1) > div.o_kanban_record').length, 0,
|
||||
@@ -91,8 +89,6 @@ QUnit.module('Views', {
|
||||
kanban.$('.o_kanban_mobile_tab:nth(1)').trigger('click');
|
||||
assert.hasClass(kanban.$('.o_kanban_mobile_tab:nth(1)'),'o_current',
|
||||
"second tab is now active with class 'o_current'");
|
||||
assert.hasClass(kanban.$('.o_kanban_group:nth(1)'),'o_current',
|
||||
"second column is now active with class 'o_current'");
|
||||
assert.strictEqual(kanban.$('.o_kanban_group:nth(1) > div.o_kanban_record').length, 2,
|
||||
"the 2 records of the second group have now been loaded");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user