Self Service portal emits a number of events to help you do advanced customisations. You can listen to events at a document or container level. 

Document Events

Events which can listened at a document level.

Example:

$(document).on('PageChange', function(e) {

  new FSToastr({

    message: 'New Page Alert',

    type: 'success'

  }, true, true);

  console.log(e.detail);

});

 

 

PageUpdate

Fires when the page is updated

PageChange

Fires when the page is changed

SearchOpen

Fires when the search overlay is opened

SearchClose

Fires when the search overlay is closed

SideModalOpen

Fires when the side modal window is opened

SideModalRendered

Fires when the side modal window is rendered

SideModalClosed

Fires when the side modal window is closed

ModalOpen

Fires when the modal opens (used in Add People / Delegate Approvals / Change password)

ModalClose

Fires when the modal closes (used in Add People / Delegate Approvals / Change password)

Container Events

Events which can be listened at a container level

Example:


$('#search-results').on('SearchResult', function(e) {

  new FSToastr({

    message: 'Search Results updated',

    type: 'success'

  }, true, true);

  console.log(e.detail);

});

 

  

DOM Container

Event

Description

#search-results

SearchResult

Fires when the search result is rendered

#menu-icon, .menu-trigger

MenuOpen

Fires when the menu opens

MenuClose

Fires when the menu closes

#ticket-attachments

AttachmentLoad

Fires when the user attaches a file

AttachmentDone

Fires when the attachment is uploaded

select

SelectOpen

Fires when the user opens a dropdown

SelectClose

Fires when the user closes a dropdown