Merge PR #1883 into 14.0

Signed-off-by pedrobaeza
pull/1889/head
OCA-git-bot 2021-03-31 17:29:13 +00:00
commit 044969ee52
2 changed files with 45 additions and 1 deletions

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();
}
},
});
});