Jump to: navigation, search

Configuration

Description

App uses the configuration property '_genesys.widgets.main'. App controls the Genesys Widgets product as a whole, handling themes, languages, and mobile devices.

Example

window._genesys.widgets.main = {

	theme: 'dark',
	themes: {

		dark: 'cx-theme-dark',
		light: 'cx-theme-light',
		blue: 'cx-theme-blue',
		red: 'cx-theme-red'
	},
	lang: 'en',
	i18n: '/i18n.json',
	mobileMode: 'auto',
	mobileModeBreakpoint: 600,
	debug: true
}

Options

Name Type Description Default Required
main.themes object An object list containing the CSS classname for each Theme. The property names are used to select the theme in the 'theme' property. such as

{ dark:'cx-theme-dark', light:'cx-theme-light', 'red':'cx-theme-red', 'blue':'cx-theme-blue'}

Where 'dark' and 'light' are the built-in themes provided in Genesys Widgets and 'red' and 'blue' are example custom theme names you may create on your own. Note: It is not necessary to define the 'dark' and 'light' theme as shown in this example. It is included to help show how the formatting works. Whatever you put in this object will be merged with the default themes object internally.

{dark: 'cx-theme-dark', light: 'cx-theme-light'} n/a
main.theme string Selects the theme to apply to Genesys Widgets from the 'themes' object. Uses the property name of the theme. such as using the example from 'themes' above, possible values for this could be 'dark', 'light', 'red', 'blue'. dark n/a
main.lang string Select the language to use from the 'i18n' language pack. Language codes are selected by the customer. Any language code format can be used as long as this property matches one of the language codes in your i18n language pack. For more information about localization, see localization. en n/a
main.i18n URL string or JSON Either a path to a remote i18n.json language pack file or an inline JSON language pack definition. For more information about language packs, see localization. Default English language strings are built into each widget and are displayed by default. Defining this i18n language pack overrides the built-in strings. n/a
main.mobileMode boolean/string Mobile Mode setting.

true = Force Mobile Mode on all devices. false = Disable Mobile Mode completely. 'auto' = Genesys Widgets Automatically switches between Mobile and Desktop Modes using the 'mobileModeBreakpoint' property and UserAgent detection.

auto n/a
main.timeFormat number/string This sets the time format for the timestamps. It can be 12 or 24 12 n/a
main.mobileModeBreakpoint number The breakpoint width in pixels where Genesys Widgets will switch to Mobile Mode. Breakpoint checked at startup only. 600 n/a
main.debug boolean Enable debug logging from the bus to appear in the browser console. false n/a
main.customStylesheetID string The HTML ID of a <style> tag that contains CSS overrides, custom themes, or other custom CSS intended for Genesys Widgets. On startup, Widgets will move this <style> tag to the end of the document so that 1:1 CSS class overrides apply correctly. n/a n/a
main.downloadGoogleFont boolean By default, Genesys Widgets downloads and uses the Google font 'Roboto'. To disable this download, set this value to false. true n/a
main.deploymentID string The string used to customize Cookie names so that multiple Widgets deployments can run in the same domain. n/a n/a

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on October 30, 2018, at 06:58.