-
-
Notifications
You must be signed in to change notification settings - Fork 905
/
index.js
72 lines (69 loc) · 1.99 KB
/
index.js
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
65
66
67
68
69
70
71
72
function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "index";
this.args = arguments[0] || {};
if (arguments[0]) {
{
__processArg(arguments[0], "__parentSymbol");
}
{
__processArg(arguments[0], "$model");
}
{
__processArg(arguments[0], "__itemTemplate");
}
}
var $ = this;
var exports = {};
$.__views.index = Ti.UI.createWindow({
backgroundColor: "#fff",
fullscreen: false,
exitOnClose: true,
id: "index"
});
$.__views.index && $.addTopLevelView($.__views.index);
$.__views.testLabel = Ti.UI.createLabel(function() {
var o = {};
Alloy.deepExtend(true, o, {
font: {
fontSize: "22dp"
},
color: "purple",
text: "Simple class label applied"
});
(Alloy.Globals.custom1 || Alloy.Globals.custom2) && Alloy.deepExtend(true, o, {
text: "iOS or Android! Styles conditionals correctly applied"
});
Alloy.deepExtend(true, o, {
id: "testLabel"
});
return o;
}());
$.__views.index.add($.__views.testLabel);
if (true && (Alloy.Globals.custom1 || Alloy.Globals.custom2)) {
$.__views.testLabel2 = Ti.UI.createLabel({
font: {
fontSize: "22dp"
},
color: "purple",
text: "Added in XML",
id: "testLabel2",
bottom: 100
});
$.__views.index.add($.__views.testLabel2);
}
exports.destroy = function() {};
_.extend($, $.__views);
$.index.open();
_.extend($, exports);
}
var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller;