Customize "Offline" toast message

0
0

Are there any client side javascript events to handle to perform a complete customization of the Offline status replacing the toast message of WiseJ ?

  • You must to post comments
0
0

 

/**
 * onOnline
 * 
 * Called when the device goes back onOnline and the connection with the server can be established
 * successfully.
 * 
 * The default implementation hides the themeable "toast" shows by the default implementation
 * of Wisej.onOffline.
 * 
 * Usage:
 * 
 * Wisej.onOnline = function() { console.log("Offline"); };
 * 
 */
Wisej.onOnline = Wisej.onOnline || function () {

 Wisej.Platform.showOfflineToast(false);
};

/**
 * onOffline
 * 
 * Called when the device goes offline or the connection with the server cannot be established.
 * 
 * The default implementation shows a themeable "toast".
 *
 * Usage:
 *
 * Wisej.onOnline = function() { console.log("Offline"); };
 *
 * @param offlineUrl {String} URL to navigate to when the offline state is detected.
 */
Wisej.onOffline = Wisej.onOffline || function (offlineUrl) {

 if (offlineUrl)
   location.href = offlineUrl;
 else
   Wisej.Platform.showOfflineToast(true);
};

 

Here you can find all the Wisej widgets.

https://github.com/iceteagroup/Wisej-js

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.