[IMP] web: Fold column quick create on load examples
Before this commit, after adding a column or loading examples in a kanban from the quick create column, it stays open. After this commit, it will stay open if adding a column through it, but it will fold if the user has loaded a set of columns from an example. Task ID 2047369 PR #48299
This commit is contained in:
committed by
Thibault Delavallée
parent
59a0b92995
commit
56835877d2
@@ -192,7 +192,7 @@ var ColumnQuickCreate = Widget.extend({
|
||||
click: function () {
|
||||
const activeExample = self.examples[this.$('.nav-link.active').data("exampleIndex")];
|
||||
activeExample.columns.forEach(column => {
|
||||
self.trigger_up('quick_create_add_column', {value: column.toString()});
|
||||
self.trigger_up('quick_create_add_column', { value: column.toString(), foldQuickCreate: true });
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -226,7 +226,10 @@ var KanbanController = BasicController.extend({
|
||||
}).then(function () {
|
||||
return self.update({}, {reload: false});
|
||||
}).then(function () {
|
||||
self.renderer.quickCreateToggleFold();
|
||||
let quickCreateFolded = self.renderer.quickCreate.folded;
|
||||
if (ev.data.foldQuickCreate ? !quickCreateFolded : quickCreateFolded) {
|
||||
self.renderer.quickCreateToggleFold();
|
||||
}
|
||||
self.renderer.trigger_up("quick_create_column_created");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user