-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIFW_content.html
More file actions
154 lines (150 loc) · 5.35 KB
/
UIFW_content.html
File metadata and controls
154 lines (150 loc) · 5.35 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
<!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 : "窗口动画",
content : [{
title : '由左往右推入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由右往左推入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由上往下推入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由下往上推入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '淡入淡出',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '左翻页(android暂不支持)',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '右翻页(android暂不支持)',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '水波纹(android暂不支持)',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由左往右切入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由右往左切入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由上往下切入',
name : "anim",
url : "UIcontrol/base.html"
}, {
title : '由下往上切入',
name : "anim",
url : "UIcontrol/base.html"
}]
}, {
header : "多Frame交互(左右拖拽切换页面)",
name : "multiFrame",
url : "UIcontrol/tab_text.html"
}, {
header : "窗口叠加(抽屉式效果)",
name : "multiWindow",
url : "UIcontrol/drawer.html"
}, {
header : "拖拽刷新(pull to refresh)",
content : [{
title : '只弹动无刷新',
name : "control",
url : "UIcontrol/pull_norefresh.html"
}, {
title : '下拉刷新',
name : "control",
url : "UIcontrol/pull_toprefresh.html"
}, {
title : '上拉刷新',
name : "control",
url : "UIcontrol/pull_bottomrefresh.html"
}, {
title : '双向刷新',
name : "control",
url : "UIcontrol/pull_refresh.html"
}]
}, {
header : "网站嵌入",
name : "web",
url : "UIcontrol/web.html"
}, {
header : "AJAX通信",
content : [{
title : '数据下载',
name : "ajax",
url : "UIcontrol/request.html"
}]
}]);
tv.on('listviewClick', function(ele, data, obj) {
if (data.name == "anim" && data.url) {
var animID = parseInt(ele.data("index")) + 1;
appcan.window.open(data.name, data.url, animID);
} else if (data.name == "control" && data.url) {
appcan.window.open(data.name, data.url, 10);
} else if (data.name == "ajax") {
appcan.window.open({
name : data.name,
data : data.url,
type : 16
});
}
});
tv.on('click', function(ele, obj, subobj) {
if (obj.name == "multiWindow") {
appcan.window.open({
name : obj.name,
data : obj.url,
dataType : "",
aniId : 10,
type:256
});
} else if (obj.name && obj.url) {
appcan.window.open(obj.name, obj.url, 10);
}
});
</script>
</html>