blob: 953e4a09522471cd2f452dacb2090d9ccf48f893 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
(function( app ) {
var ux = app.ns("ux");
var extend = ux.Observable.extend;
var instance = function() {
if( ! ("me" in this) ) {
this.me = new this();
}
return this.me;
};
ux.Singleton = ux.Observable.extend({});
ux.Singleton.extend = function() {
var Self = extend.apply( this, arguments );
Self.instance = instance;
return Self;
};
})( this.app );
|