This client-side class allows operation with modal objects (such as pop-ups).

s_modal


Instantiates a new SimpleModal object.


renderPageTemplate (portalPathName, pagePathName)


This method displays content in a modal 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)


This method displays content in a modal according to the set of widgets the portal page template contains.


Parameter(s):

NameTypeMandatoryDefault Value
pagePathName StringYN
portalPathNameStringYN

Return:

TypeDescription
VoidThis method does not return a value.

Example:

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

renderTemplate(template, style)


This method renders the UI page in the modal with the 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)


This method allows specifying whether to show or to hide the modal object when calling the method.


Parameter(s):

NameTypeMandatoryDefault Value
isShowBooleanNTRUE


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setShow
s_modal.setShow(false);

setTitle(title)


Using this method, you can define the title of the modal object.


Parameter(s):

NameTypeMandatoryDefault Value
titleStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setTitle
s_modal.setTitle('Merging');

setWidth(width)


Using this method, you can define the width of the modal object in pixels.


Parameter(s):

NameTypeMandatoryDefault Value
widthIntegerYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

setWidth
s_modal.setWidth(500);

  • No labels