-
Notifications
You must be signed in to change notification settings - Fork 13
/
default.html
95 lines (87 loc) · 1.97 KB
/
default.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>mv-default tests</title>
<link rel="stylesheet" href="https://get.mavo.io/mavo.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://get.mavo.io/mavo.js"></script>
<script src="mavotest.js"></script>
</head>
<body>
<h1>mv-default tests</h1>
<section mv-app="mvdefault">
<h1>Dynamic mv-default</h1>
<p>For collection test: Add one item.</p>
<table class="reftest">
<tr>
<td>
<input type="range" property="prop1" value="50">
<span property="prop2" mv-default="[prop1 + 1]"></span>
</td>
<td>[prop1] [prop1 + 1]</td>
</tr>
<tr>
<td>
<input type="number" property="prop3" value="0">
<input property="prop4" mv-default="[prop3 + 1]">
</td>
<td>[prop3 + 0] [prop3 + 1]</td>
</tr>
<tr title="In Collection" data-click=".mv-add.mv-ui wait 3s">
<td>
<div mv-multiple mv-mode="edit">
<span property="prop_multiple" mv-default="[$index]"></span>
[prop_multiple]
</div>
</td>
<td>
<div>0 0</div>
<div>1 1</div>
</td>
</tr>
<tr>
<td>[prop_multiple]</td>
<td>0, 1</td>
</tr>
<tr>
<td><meta property="prop5" mv-default="[1 = 1]" />[Bliss.type(prop5)]</td>
<td>boolean</td>
</tr>
</table>
</section>
<section>
<h1>mv-default</h1>
<table class="reftest">
<tr title="Defaults should not be saved" data-click=".mv-save wait 1s" class="ignore">
<td mv-app mv-storage="#mvdefault-data">
<div mv-multiple>
<span property="prop" mv-default="1"></span>
</div>
<span property="prop" mv-default="2"></span>
</td>
<td>
<pre id="mvdefault-data">{
}</pre>
</td>
<td>{
"collection": [
{
}
]
}</td>
</tr>
<tr title="Defaults should be applied on load">
<td>
</td>
<td mv-app mv-storage='data:application/json,{}' mv-expressions-ignore="mv-storage">
<span property="prop" mv-default="1"></span>
</td>
<td>
1
</td>
</tr>
</table>
</section>
</body>
</html>