-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIcontrol_content.html
More file actions
161 lines (158 loc) · 5.43 KB
/
UIcontrol_content.html
File metadata and controls
161 lines (158 loc) · 5.43 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="css/fonts/font-awesome.min.css">
<link rel="stylesheet" href="css/ui-base.css">
<link rel="stylesheet" href="css/ui-box.css">
<link rel="stylesheet" href="css/ui-color.css">
<link rel="stylesheet" href="css/appcan.control.css">
</head>
<body class="um-vp bc-bg" ontouchstart>
<div>
<!--列表开始-->
<div class="sc-bg" id="treeview">
</div>
<!--列表结束-->
</div>
<script src="js/appcan.js"></script>
<script src="js/appcan.control.js"></script>
<script src="js/appcan.listview.js"></script>
<script src="js/appcan.treeview.js"></script>
</body>
<script>
appcan.ready(function() {
//appcan.initBounce();
})
var tv = appcan.treeview({
selector : "#treeview",
defaultOpen : 1//默认打开第几项,必须包含数据
});
tv.set([{
header : "按钮(button)",
name : "control",
url : "UIcontrol/button.html"
}, {
header : "单选框(radio)",
name : "control",
url : "UIcontrol/radio.html"
}, {
header : "复选框(checkbox)",
name : "control",
url : "UIcontrol/check.html"
}, {
header : "下拉框(select)",
name : "control",
url : "UIcontrol/select.html"
}, {
header : "文本输入(input,texarea)",
name : "control",
url : "UIcontrol/input.html"
}, {
header : "消息框(dialog)",
name : "control",
url : "UIcontrol/dialog.html"
}, {
header : "图片轮播(slider)",
name : "control",
url : "UIcontrol/slider.html"
}, {
header : "列表(list)",
content : [{
title : '单行列表',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行右侧带箭头',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行带描述右侧带箭头',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行复选',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行单选',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行全包含',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '单行带控件',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '多行列表',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '文字换行缩略',
name : "listview",
url : "UIcontrol/listview.html"
}, {
title : '分组列表',
name : "listview",
url : "UIcontrol/lv_group.html"
}]
}, {
header : "标题导航栏(header)",
content : [{
title : '图片标题',
name : "control",
url : "UIcontrol/nav-icon.html"
}, {
title : 'FontAwesome图片标题',
name : "control",
url : "UIcontrol/nav-fa.html"
}]
}, {
header : "开关(switch)",
name : "control",
url : "UIcontrol/switch.html"
}, {
header : "选项卡(tab bar)+多Frame",
content : [{
title : '纯文字',
name : "control",
url : "UIcontrol/tab_text.html"
}, {
title : '文字加图标',
name : "control",
url : "UIcontrol/tab_text_icon.html"
}, {
title : '图标',
name : "control",
url : "UIcontrol/tab_icon.html"
}]
}, {
header : "图标",
content : [{
title : '图片图标',
name : "control",
url : "UIcontrol/icon.html"
}, {
title : 'Font Awesome图标',
name : "control",
url : "UIcontrol/fa.html"
}]
}]);
tv.on('listviewClick', function(ele, data, obj) {
if (data.name && data.url) {
appcan.locStorage.setVal("lv_index", ele.data("index"));
appcan.window.open(data.name, data.url, 10);
}
});
tv.on('click', function(ele, obj, subobj) {
if (obj.name && obj.url) {
appcan.window.open(obj.name, obj.url, 10);
}
});
</script>
</html>