...
The characteristics of the documents that should be considered when generating the main list can be determined. For example, the user can choose to display documents with an expiration date, in order to find out which have already expired and which are about to expire.
Status |
---|
subtle | true |
---|
title | Learn more |
---|
|
HTML |
---|
<a id="toggleAll" href="#" >Expand/hide additional information. </a>
<script type="text/javascript">
var abertos = 0;
var fechados = 0;
function contador() {
abertos = 0;
fechados = 0;
jQuery(".expand-control").each( function() {
if (document.getElementById(this.id).children[0].className != "expand-control-icon icon expanded") {
fechados++;
} else {
abertos++;
}
});
}
AJS.toInit(function() {
contador();
var soma = abertos + fechados;
$("#toggleAll").html('Expand/hide ' + soma + ' additional information.');
AJS.$('#toggleAll').click(function() {
contador();
if (abertos >= fechados) {
jQuery(".expand-control").each(
function() {
if (document.getElementById(this.id).children[0].className == "expand-control-icon icon expanded") {
jQuery(this).trigger("click");
}
}
)
} else {
jQuery(".expand-control").each(
function() {
if (document.getElementById(this.id).children[0].className != "expand-control-icon icon expanded") {
jQuery(this).trigger("click");
}
}
)
}
});
});
</script> |
Basic path
01. After clicking on the option Main list, found under More in the action bar on the top left of the window, define the data that should be considered when generating the main list.
...