-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
76 lines (65 loc) · 1.41 KB
/
demo.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Actionbar Demo - X-Tag</title>
<link rel="stylesheet" type="text/css" href="../actionbar.css" />
<script type="text/javascript" src="../../lib/x-tag/x-tag.js"></script>
<script type="text/javascript" src="../actionbar.js"></script>
<script type="text/javascript" src="../../overlay/overlay.js"></script>
<style>
</style>
</head>
<body>
<x-actionbar group="1">
<x-action
group="1 2"
command="new-content"
label="New"
icon="plus.png">
</x-action>
<x-action
group="1 2"
command="refresh-content"
label="Refresh"
icon="refresh.png">
</x-action>
<x-action
group="1 2"
command="gridify-content"
label="Grid"
icon="grid.png">
</x-action>
<x-action
group="2"
command="action-4"
label="4th Action"
icon="grid.png">
</x-action>
<x-action
group="2"
command="action-5"
label="5th Action"
icon="grid.png">
</x-action>
<x-action
group="1 2"
label="Advanced"
command="more"
icon="more-actions.png">
</x-action>
</x-actionbar>
</body>
<script type="text/javascript">
xtag.addEvent(document, 'command', function(e){
console.log(e.command);
if (e.command == "more"){
if (e.target.parentNode.group == "1"){
e.target.parentNode.group = 2;
}else{
e.target.parentNode.group = 1;
}
}
});
</script>
</html>