[FIX] error on grouped mobile kanban with zero groups

pull/2405/head
Splash 2021-03-27 00:16:19 +03:00 committed by anjeel.haria
parent 8c307b3b7f
commit 0dd8325f71
3 changed files with 46 additions and 2 deletions

View File

@ -6,7 +6,7 @@
{
"name": "Web Responsive",
"summary": "Responsive web client, community-supported",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"category": "Website",
"website": "https://github.com/OCA/web",
"author": "LasLabs, Tecnativa, " "Odoo Community Association (OCA)",

View File

@ -710,6 +710,19 @@ html .o_web_client .o_action_manager .o_action {
}
}
//No content message improvements on mobile
@include media-breakpoint-down(md) {
.o_view_nocontent {
top: 80px;
}
.o_nocontent_help {
box-shadow: none;
}
.o_sample_data_disabled {
display: none;
}
}
// Sided chatter, if user wants
.o_chatter_position_sided & {
@include media-breakpoint-up(lg) {

View File

@ -26,6 +26,24 @@
this._super.apply(this, arguments);
this.isMobile = true;
},
/**
* KanbanRenderer will decide can we close quick create or not
* @private
* @override
*/
_cancel: function () {
this.trigger_up("close_quick_create");
},
/**
* Clear input when showed
* @override
*/
toggleFold: function () {
this._super.apply(this, arguments);
if (!this.folded) {
this.$input.val("");
}
},
});
KanbanView.include({
@ -345,6 +363,9 @@
* and displayed
*/
_moveToGroup: function (moveToIndex, animate) {
if (this.widgets.length === 0) {
return Promise.resolve();
}
var self = this;
if (moveToIndex >= 0 && moveToIndex < this.widgets.length) {
this.activeColumnIndex = moveToIndex;
@ -477,8 +498,8 @@
if (event) {
event.stopPropagation();
}
this.$(".o_kanban_group").toggle();
this.quickCreate.toggleFold();
this.$(".o_kanban_group").toggle(this.quickCreate.folded);
},
/**
* @private
@ -490,5 +511,15 @@
}
this._moveToGroup($(event.currentTarget).index(), true);
},
/**
* @private
* @override
*/
_onCloseQuickCreate: function () {
if (this.widgets.length && !this.quickCreate.folded) {
this.$(".o_kanban_group").toggle(true);
this.quickCreate.toggleFold();
}
},
});
});