-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-constructor-functions.html
82 lines (73 loc) · 1.93 KB
/
demo-constructor-functions.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width" />
<title>at-core-form constructor functions demo</title>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="at-core-form.html" />
<style>
.container-w {
width: 85%; /* when fixed width is used ie 1024px resize sensor doesn't work */
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
padding-bottom: 64px;
}
.container-m {
width: 70%; /* when fixed width is used ie 1024px resize sensor doesn't work */
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
padding-bottom: 64px;
}
.container-s {
width: 55%; /* when fixed width is used ie 1024px resize sensor doesn't work */
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
padding-bottom: 64px;
}
[class*='col-'] {
border: 1px dashed blue;
}
</style>
</head>
<body>
<div class="container-w">
<at-core-form id="coreFormDemo"></at-core-form>
</div>
<script>
window.addEventListener('WebComponentsReady', function (e) {
var demoForm = document.getElementById("coreFormDemo");
demoForm.schema = {
'properties': {
'id': {
'title': 'The unique identifier for a product',
'type': Number,
'required': true,
'hint': 'Input required.'
},
'name': {
'type': String,
'required': true
},
'activeDemo1': {
'type': Boolean
},
'city': {
'type': Object,
'title': 'This is City object'
},
'activeDemo2': {
'type': Array,
'title': 'This is array demo'
}
}
};
});
</script>
</body>
</html>