Set sao's multiselection widget height according to its content
This commit is contained in:
@@ -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%;
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user