Set sao's multiselection widget height according to its content

This commit is contained in:
Nicolas Évrard
2025-03-05 18:13:37 +01:00
parent baaf7784fa
commit 9babb76a0f
3 changed files with 17 additions and 7 deletions
+14
View File
@@ -1131,6 +1131,13 @@ img.icon {
content: "☑ ";
}
}
&.yexpand {
select {
min-height: 150px;
max-height: 400px;
}
}
}
.form-integer, .form-float, .form-timedelta,
@@ -1250,6 +1257,13 @@ input.column-boolean {
}
}
.filter-window {
select[multiple] {
min-height: 150px;
max-height: 400px;
}
}
@media screen and (max-width: @screen-xs-max) {
.form-dict-container {
grid-template-columns: 100%;
+2
View File
@@ -454,6 +454,7 @@
this.search_modal = dialog.modal;
this.search_form = dialog.content;
this.search_form.addClass('form-horizontal');
this.search_form.addClass('filter-window');
this.search_form.submit(function(e) {
e.preventDefault();
search();
@@ -503,6 +504,7 @@
entry = new Sao.ScreenContainer.Selection(
field.selection, prefix + field.name);
input = entry.el;
input.prop('size', field.selection.length);
break;
case 'date':
format = Sao.common.date_format(
+1 -7
View File
@@ -4716,13 +4716,7 @@ function eval_pyson(value){
var record = this.record;
var field = this.field;
this.update_selection(record, field, () => {
var yexpand = this.attributes.yexpand;
if (yexpand === undefined) {
yexpand = this.expand;
}
if (!yexpand) {
this.select.prop('size', this.select.children().length);
}
this.select.prop('size', this.select.children().length);
if (!field) {
return;
}