Skip to main content
Version: 1.22.3

SimpleModal

This client-side class provides methods that manage modal objects, such as pop-up windows.

s_modal


Use this global object to instantiate a new SimpleModal object. Use it in client scripts for the widgets or the UI Actions.

renderPageTemplate (portalPathName, pagePathName)


Use this method to display the content in a modal window according to the set of widgets the portal page template contains.

Parameter(s):

NameTypeMandatoryDefault value
portalPathNameStringYN
pagePathNameStringYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

renderPageTemplate()
s_modal.renderPageTemplate('portal', 'page');

renderPagePathTemplate (pagePathName, portalPathName)


Use this method to display the content in a modal window according to the set of widgets the portal page template contains. This method is similar to the previous one but has another sequence of parameters.

Parameter(s):

NameTypeMandatoryDefault value
pagePathNameStringYN
portalPathNameStringYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

renderPagePathTemplate()
s_modal.renderPagePathTemplate('page', 'portal');

renderTemplate(template, style)


Use this method to render the UI page in the modal window with the HTML template and styles specified.

Parameter(s):

NameTypeMandatoryDefault value
htmlStringYN
styleStringN''

Return:

TypeDescription
VoidThis method does not return a value.

Example:

renderTemplate()
s_modal.renderTemplate('<div><h1>Hello</h1></div>', 'h1 {color: red}; div {margin: 20px}');

setShow(isShow)


Use this method to specify whether to show or hide a modal window.

Parameter(s):

NameTypeMandatoryDefault value
isShowBooleanNtrue

Return:

TypeDescription
VoidThis method does not return a value.

Example:

setShow()
s_modal.setShow(false);

setTitle(title)


Use this method to define the title of the modal window.

Parameter(s):

NameTypeMandatoryDefault value
titleStringYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

setTitle()
s_modal.setTitle('Merging');

setWidth(width)


Use this method to define the width of the modal window in pixels.

Parameter(s):

NameTypeMandatoryDefault value
widthIntegerYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

setWidth()
s_modal.setWidth(500);

setIsLoading(isLoading)


Use this method to define if the loader should be displayed in the modal window.

Parameter(s):

NameTypeMandatoryDefault value
isLoadingBooleanYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

setIsLoading()
s_modal.setIsLoading(true);