Welcome Panel API

Welcome Panel API

Welcome Panel Overview

Displays the welcome message.

On This Page
Still need help?

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


Adding a Welcome Panel to a Component/Grade

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

 

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

Since the welcome panel is to display a static message. It doesn't tie with any preference.

Option 2: Adding as a stand alone component:

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

Grades

The base grades used by the Yes/No 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 welcome message.

".gpiic-fd-welcome-instructions"

Dependencies

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