Article Details
| Id: | 17270 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 3.03.03 |
| Opened: | 10/08/2020 |
| Closed: | 10/08/2020 |
| Released: | 01/10/2020 |
| Job: | J024802 |
Portals; Pages displaying in Modal forms now support custom handling of the Close button
Portals now support the concept of being able to override the Close button behaviour when displaying in a Modal. This functionality works exactly the same as HTML Widgets.
An example is:
// Initialise$(function() {// Disable Close Button (this causes the 'FormClose' notification action to be invoked instead)widget.DisableCloseButton();page.ActionNotificationHandle(Widget_NotificationHandler)});// ====================// Notification Handler// ====================function Widget_NotificationHandler(actionId, data) {switch(actionId) {case "FormClose":// Prompt to closewidget.UI.MsgBoxConfirm("Are you sure you want to close this form without saving your changes?", {}, function () { widget.Close(); } );break;}}
NOTE: widget and page can be used interchangeably as per the above example.