Module

RMP_Section


new RMP_Section(conf)

This constructor allows you to create a section widget that can be inserted dynamically in your web interface.

Parameters:
Name Type Description
conf Object JSON structure which contains the configuration of the section
Example
var conf = {"id":"id_section","label":"Section label","open":true};
var section= new RMP_Section(conf);
id_of_a_widget.insertAbove(section);
id_section.setOnOpenScript(()=> {console.log('opened')}) 

Methods

# inner close()

Closes the section.

# inner getType() → {string}

Returns the type of the widget (RMP_Section).
string

# inner isOpen() → {string}

Returns true if the section is opened, otherwise false.
string

# inner open()

Opens the section.

# inner setOnCloseScript(callBk)

Sets a callback function to handle the "on section closed" script field of a section widget.
Parameters:
Name Type Description
callBk module:RMP_Section~callbackFunction Callback that handles the "on section closed" script.

# inner setOnOpenScript(callBk)

Sets a callback function to handle the "on section opened" script field of a section widget.
Parameters:
Name Type Description
callBk module:RMP_Section~callbackFunction Callback that handles the "on section opened" script.

Type Definitions

# callbackFunction()

Callback function to execute the onOpen/onClose script field of a section widget.