multi-enum display as list

This commit is contained in:
yuri
2019-10-09 11:06:34 +03:00
parent afc17ac54c
commit bd4e92d892
4 changed files with 18 additions and 1 deletions
@@ -188,6 +188,7 @@
"inlineEditDisabled": "Disable Inline Edit",
"allowCustomOptions": "Allow Custom Options",
"displayAsLabel": "Display as Label",
"displayAsList": "Display as List",
"maxCount": "Max Item Count",
"accept": "Accept",
"displayRawText": "Display raw text (no markdown)"
@@ -37,6 +37,10 @@
"name":"displayAsLabel",
"type":"bool"
},
{
"name": "displayAsList",
"type":"bool"
},
{
"name":"audited",
"type":"bool"
+6 -1
View File
@@ -395,7 +395,12 @@ define('views/fields/array', ['views/fields/base', 'lib!Selectize'], function (D
if (this.displayAsList) {
if (!list.length) return '';
return '<div>' + list.join('</div><div>') + '</div>';
var itemClassName = 'multi-enum-item-container';
if (this.displayAsLabel) {
itemClassName += ' multi-enum-item-label-container';
}
return '<div class="'+itemClassName+'">' +
list.join('</div><div class="'+itemClassName+'">') + '</div>';
} else if (this.displayAsLabel) {
return list.join(' ');
} else {
+7
View File
@@ -1041,6 +1041,13 @@ ul.dropdown-menu > li.checkbox:last-child {
margin-bottom: 0;
}
}
.multi-enum-item-label-container {
margin-bottom: 4px;
}
.multi-enum-item-label-container:last-child {
margin-bottom: 0;
}
}
.filter > .form-group .field {