Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

A form record is a set of data entered when answering a form. They are published within the form to which they belong, in the same format and with the same data, corresponding to the existing fields on the form.

 

Estado
subtletrue
titleSaiba maisLearn more

HTML
<a id="toggleAll" href="#" >Expandir>Expand/ocultarhide informaçõesadditional complementaresinformation. </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('ExpandirExpand/ocultarhide ' + soma  + ' informaçõesadditional complementaresinformation.');

    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>

...