Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

kostysh/Online-Manager-for-Sencha-Touch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Online-Manager-for-Sencha-Touch

Utility for detection of the online status, and something else

Author: Constantine V. Smirnov, kostysh(at)gmail.com, http://mindsaur.com
License: GNU GPL v3.0
Current version: 1.1
ST2 version: 2.1.0 Beta1
ST2 SDK Tools: 2.0.0 Beta 3

Versions:

  • 1.0 Initial release

Features:

  • Detection of the online status (real, not only connection)
  • Events: exception, beforeonline, beforeoffline, onlinechange, online, offline

Requirements:

Installing:

  • Place src to your app folder;
  • Place online.php on your app's server (any place accessible from the web);
  • Configure custom path for custom components:
    Ext.Loader.setPath({
        'Ext.ux': '[..path..]src/ux'
    });
  • Require Ext.ux.util.OnlineManager class in app.js/controller or view config:
    requires: ['Ext.ux.util.OnlineManager']

Usage:

  • Configure path to online.php:
    OnlineManager.setUrl('[path/to]/online.php');          
  • Configure OnlineManager:
    OnlineManager.on({
        'onlinechange': function(mode) {
            if (mode) {
                console.log('We are online');
            } else {
                console.log('We are offline');
            }
        }
    });
  • Start OnlineManager:
    OnlineManager.start();
  • Stop OnlineManager:
    OnlineManager.stop();

Online demo:

http://mindsaur.com/demo/online/

About

Utility for detection of the online status, and something else

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published