admin:online-platform-cms:using-web-ui-custom-events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin:online-platform-cms:using-web-ui-custom-events [2021/09/27 09:15] evaldas-luksysadmin:online-platform-cms:using-web-ui-custom-events [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 146: Line 146:
   * This event allows custom script to stop the route change in the app by adding 'Event.preventDefault()' in the event's listener.   * This event allows custom script to stop the route change in the app by adding 'Event.preventDefault()' in the event's listener.
   * Each game has it's own module names, so Roulette page will fire 'roulette' and Dogs page 'dogs' modaleNames.   * Each game has it's own module names, so Roulette page will fire 'roulette' and Dogs page 'dogs' modaleNames.
 +  * Games with nested URLs will have the same moduleName, but different names under the 'from' and 'to' objects.
    
 Script example and what it does: Script example and what it does:
Line 163: Line 164:
  
    if (routeChangeEvent.detail.moduleName === 'betgames-iframe') {    if (routeChangeEvent.detail.moduleName === 'betgames-iframe') {
 +       // preventDefault prevents the route from updating, so the user cannot access this page normally as he would. In this case
 +       // we provide our custom solution to guide user when he tries to visit this module (page)
        routeChangeEvent.preventDefault();        routeChangeEvent.preventDefault();
        displayBetGamesModal(routeChangeEvent.detail.to, routeChangeEvent.detail.from);        displayBetGamesModal(routeChangeEvent.detail.to, routeChangeEvent.detail.from);
  • admin/online-platform-cms/using-web-ui-custom-events.1632734101.txt.gz
  • Last modified: 2021/09/27 09:15
  • (external edit)