js: hide collapsed subform elements when not dd/dt

This commit is contained in:
Thomas Gelf 2016-03-24 11:44:24 +01:00
parent e7ea68b94f
commit 46bb1f7c7f
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@
fixFieldsetInfo: function($fieldset) {
if ($fieldset.hasClass('collapsed')) {
if ($fieldset.find('legend span.element-count').length === 0) {
var cnt = $fieldset.find('dt').length;
var cnt = $fieldset.find('dt, li').length;
$fieldset.find('legend').append($('<span class="element-count"> (' + cnt + ')</span>'));
}
} else {