-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathitembar.html
115 lines (109 loc) · 2.58 KB
/
itembar.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Item bar tests</title>
<link rel="stylesheet" href="https://get.mavo.io/mavo.css" />
<link rel="stylesheet" href="style.css" />
<style>
.mv-item-bar.mv-item-bar.mv-item-bar {
position: static;
opacity: 1;
border: 0;
pointer-events: auto;
}
[mv-list-item] {
border: 1px solid rgba(0,0,0,.2);
background: rgba(0,0,0,.1);
padding: .5em;
margin: .5em;
}
</style>
<script src="https://get.mavo.io/mavo.js"></script>
<script src="mavotest.js"></script>
</head>
<body>
<h1>Item bar tests</h1>
<script type="application/json" id="countries">{
"country": [
{
"code": "",
"name": "Online"
},
{
"code": "us",
"name": "United States"
},
{
"code": "gb",
"name": "United Kingdom"
}
]
}</script>
<section mv-app="customitemcontrols" mv-storage="#countries" class="mv-autoedit">
<h1>Custom item bar placement</h1>
<table class="reftest">
<tr>
<td mv-list>
<div property="country" mv-list-item>
<div class="mv-item-bar mv-ui">A</div>
<span property="code"></span>
<span property="name"></span>
</div>
</td>
<td>
<div class="bordered"><div class="mv-item-bar mv-ui">A</div> Online</div>
<div class="bordered"><div class="mv-item-bar mv-ui">A</div> us United States</div>
<div class="bordered"><div class="mv-item-bar mv-ui">A</div> gb United Kingdom </div>
</td>
</tr>
</table>
</section>
<section mv-app="customitemcontrols" mv-storage="#countries" class="mv-autoedit">
<h1>Custom item bar buttons</h1>
<table class="reftest" data-test="selector">
<tr title="No add button">
<td mv-list>
<div property="country" mv-list-item mv-item-bar="no-add">
<span property="code"></span>
<span property="name"></span>
<div class="mv-item-bar mv-ui"></div>
</div>
</td>
<td>
<ul>
<li>.mv-item-bar > .mv-delete + .mv-move</li>
<li class="not">.mv-item-bar > .mv-add</li>
</ul>
</td>
</tr>
<tr title="Different order">
<td mv-list>
<div property="country" mv-list-item mv-item-bar="with move delete">
<span property="code"></span>
<span property="name"></span>
</div>
</td>
<td>
<ul>
<li>.mv-item-bar > .mv-add + .mv-move + .mv-delete</li>
</ul>
</td>
</tr>
<tr title="No item bar">
<td mv-list>
<div property="country" mv-list-item mv-item-bar="none">
<span property="code"></span>
<span property="name"></span>
</div>
</td>
<td>
<ul>
<li>.mv-item-bar:empty</li>
</ul>
</td>
</tr>
</table>
</section>
</body>
</html>