Congratulations Panel API

Congratulations Panel API

Congratulations Panel Overview

Displays the congratulations message.

On This Page
Still need help?

Join the infusion-users mailing list and ask your questions there.


Adding a Congratulations Panel to a Component/Grade

Option 1: Typically the Congratulations Panel is integrated into the first discovery tool by supplying it as a type option into an Auxiliary Schema:

 

"congratulations": { "type": "gpii.firstDiscovery.congratulations", "panel": { "type": "gpii.firstDiscovery.panel.congratulations", "container": ".gpiic-fd-prefsEditor-panel-congratulations", "template": "%prefix/congratulationsTemplate.html", "message": "%prefix/congratulations.json" } }

Since the congratulations panel is to display a static message. It doesn't manipulate any preference.

Option 2: Adding as a stand alone component:

var myPanel = gpii.firstDiscovery.panel.congratulations(container, options);

Grades

The base grades used by the Congratulations Panel:

Selectors

One of the options that can be provided to the First Discovery Editor is a set of CSS-based selectors identifying where in the DOM different elements can be found. The value for the option is itself a Javascript object containing name/value pairs:

 

selectors: { selector1Name: "selector 1 string", selector2Name: "selector 2 string", ... }

Selector Name

Description

Default

message

The container to display the congratulation message.

".gpiic-fd-congratulations-message"

Dependencies

<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script> <script type="text/javascript" src="src/js/panels.js"></script>