Pre Login

Pre Login

Source:

Javascript file loaded on pre login pages with some handy global functions

Methods

(static) addLocalization(name, path, callback)

Source:

By default only pre-login property file localization is available on prelogin pages, but you can additionally load other localization files, like for example needed for your plugin, using this function

Example
addLocalization('enterpriseinfo', countlyGlobal["cdn"]+'enterpriseinfo/localization/');
Parameters:
Name Type Description
name string

base name of the property file without the locale/language. Should be the same name as your plugin

path string

url path to where the localization file currently resides relative to the page you want to load it from

callback function

callback executed when localization file is loaded

(static) encodeSomeHtml(html, options) → {string}

Source:

Encode some tags, leaving those set in whitelist as they are.

Parameters:
Name Type Description
html string

value to encode

options object

for encoding. Optional. If not passed, using default in common.

Returns:

encode string

Type
string

(static) showMessage(key)

Source:

This method is called to show user a message, like error when loging in. By default this is taken from query parameter or passed to template directly as message variable

Parameters:
Name Type Description
key string

key from localization property file