diff options
| author | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
|---|---|---|
| committer | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
| commit | b62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch) | |
| tree | 86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /js/dojo-1.7.2/dojox/app/module/lifecycle.js | |
Diffstat (limited to 'js/dojo-1.7.2/dojox/app/module/lifecycle.js')
| -rw-r--r-- | js/dojo-1.7.2/dojox/app/module/lifecycle.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/js/dojo-1.7.2/dojox/app/module/lifecycle.js b/js/dojo-1.7.2/dojox/app/module/lifecycle.js new file mode 100644 index 0000000..d444463 --- /dev/null +++ b/js/dojo-1.7.2/dojox/app/module/lifecycle.js @@ -0,0 +1,27 @@ +//>>built +define("dojox/app/module/lifecycle", ["dojo/_base/declare", "dojo/_base/connect"], function(declare, connect){ + return declare(null, { + + lifecycle: { + UNKNOWN: 0, //unknown + STARTING: 1, //starting + STARTED: 2, //started + STOPPING: 3, //stopping + STOPPED: 4 //stopped + }, + + _status: 0, //unknown + + getStatus: function(){ + return this._status; + }, + + setStatus: function(newStatus){ + this._status = newStatus; + + // publish /app/stauts event. + // application can subscribe this event to do some status change operation. + connect.publish("/app/status", [newStatus]); + } + }); +}); |
