-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathABApplicationMobileCore.js
More file actions
64 lines (54 loc) · 1.63 KB
/
ABApplicationMobileCore.js
File metadata and controls
64 lines (54 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* ABApplicationMobileCore
*
* This is the core ABApplicationMobile class that manages the common operations
* of a Mobile PWA ABApplication.
*/
// webpack can handle 'require()' statements, but node can't handle import
// so let's use require():
const ABViewManagerMobile = require("../platform/ABViewManagerMobile");
var ABApplication = require("../platform/ABApplication");
module.exports = class ABApplicationMobileCore extends ABApplication {
constructor(attributes, AB) {
super(attributes, AB);
this.appType = "mobile"; // Just making sure.
this.networkType = attributes.networkType;
this.pageDefault = attributes.pageDefault;
// {uuid}
// the {ABMobilePage}.uuid of the page that is our default Page.
}
///
/// Static Methods
///
/// Available to the Class level object. These methods are not dependent
/// on the instance values of the Application.
///
///
/// Instance Methods
///
get ViewManager() {
return ABViewManagerMobile;
}
pageNew(def) {
console.error("TODO: pageNew for ApplicationMobile");
return null;
}
/**
* @method toObj()
*
* properly compile the current state of this ABApplication instance
* into the values needed for saving to the DB.
*
* Most of the instance data is stored in .json field, so be sure to
* update that from all the current values of our child fields.
*
* @return {json}
*/
toObj() {
var json = super.toObj();
json.appType = "mobile";
json.networkType = this.networkType;
json.pageDefault = this.pageDefault;
return json;
}
};