Set grid template to container of board view

Closes #13663
(grafted from 27aed5d80c2c7ca9229faba7c8983a255096fb1f)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-11-06 18:01:51 +01:00
1 parent 789a515b9e
commit 3aaa03d774
2 files changed
+18 -3

No files matched your search

+17 -2
View File
@@ -7,6 +7,7 @@
_parse_board: function(node, attributes) {
var container = new Sao.View.Form.Container(
Number(node.getAttribute('col') || 4));
this.view.containers.push(container);
this.view.el.append(container.el);
this.parse_child(node, container);
if (this._containers.length > 0) {
@@ -52,9 +53,23 @@
for (i = 0; i < this.actions.length; i++) {
this.actions[i].display();
}
for (i = 0; i < this.state_widgets.length; i++) {
this.state_widgets[i].set_state(null);
var promesses = [];
for (let state_widget of this.state_widgets.toReversed()) {
var prm = state_widget.set_state(null);
if (prm) {
promesses.push(prm);
}
}
for (const container of this.containers) {
container.set_grid_template();
}
// re-set the grid templates for the StateWidget that are
// asynchronous
jQuery.when.apply(jQuery, promesses).done(() => {
for (const container of this.containers) {
container.set_grid_template();
}
});
},
active_changed: function(event_action) {
for (const action of this.actions) {
+1 -1
View File
@@ -629,7 +629,7 @@ img.icon {
}
}
.form {
.form, .board {
width: 100%;
.form-container, .form-hcontainer, .form-vcontainer {
display: grid;