Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
outlinetrue
exclude.*ndice
stylenone

 


Speaking of configuring achievements widget ...

...

That widget displays the percentage of user achievements in accordance with the goals achieved.

 

Status
subtletrue
titleLearn 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

...

Note

To use this widget, acquire the Gamification component from fluig Store.



Configure achievements widget

...

01. On the edit screen of the achievements widget, define the desired settings for it.

Expandpanel
titleLearn more

To access the widget edit mode, you need to edit the page on which it is located or will be added.

Title
Title that will be displayed in the widget.

Style
Display color of the widget.

02. Click Save.

Expandpanel
titleLearn more

For the changes in the widget settings to be displayed to users, it is necessary to post the page on which it is located. More information about posting pages can be found at Add page and Edit page.

 

...




Info
titlePlease note!

This documentation is valid from the 1.5.10 update. If you use a previous update, it may contain information different from what you see on your platform.

 

...