This client-side class provides methods that manage modal objects, such as pop-up windows.
Use this global object to instantiate a new SimpleModal object. Use it in client scripts for the widgets or the UI Actions.
Use this method to display the content in a modal window according to the set of widgets the portal page template contains.
Parameters:
Name | Type | Mandatory | Default value |
---|---|---|---|
portalPathName | String | Y | N |
pagePathName | String | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.renderPageTemplate('portal', 'page'); |
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):
Name | Type | Mandatory | Default value |
---|---|---|---|
pagePathName | String | Y | N |
portalPathName | String | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.renderPagePathTemplate('page', 'portal'); |
Use this method to render the UI page in the modal window with the HTML template and styles specified.
Parameters:
Name | Type | Mandatory | Default value |
---|---|---|---|
html | String | Y | N |
style | String | N | '' |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.renderTemplate('<div><h1>Hello</h1></div>', 'h1 {color: red}; div {margin: 20px}'); |
Use this method to specify whether to show or hide a modal window.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
isShow | Boolean | N | true |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.setShow(false); |
Use this method to define the title of the modal window.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
title | String | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.setTitle('Merging'); |
Use this method to define the width of the modal window in pixels.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
width | Integer | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
s_modal.setWidth(500); |