-
Notifications
You must be signed in to change notification settings - Fork 0
/
no-image.html
49 lines (43 loc) · 1.47 KB
/
no-image.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>DG ODS display demo</title>
<script src="../dist/odp-search.min.js"></script>
<link rel="stylesheet" href="../dist/fonts.min.css">
</head>
<body>
<div style="max-width: 1290px; margin: auto">
<odp-search id="odp-search-no-img"
source=""
dataset="../public/mockdata/ods-no-img.json?">
Your browser is not supported.
</odp-search>
</div>
<script>
customElements.whenDefined('odp-search').then(() => {
const odpSearchNoImg = document.getElementById('odp-search-no-img');
odpSearchNoImg.formFields = [
{ label: 'veld 1', column: 'kolom_1', options: [{value: 'optie1', name: 'optie één'}, {value: 'optie2', name: 'optie twee'}]},
{ label: 'veld 2', column: 'kolom_2', options: [{value: 'optie1', name: 'optie één'}, {value: 'optie2', name: 'optie twee'}]}
];
odpSearchNoImg.addEventListener('filter', sendToGTM)
odpSearchNoImg.addEventListener('detail', sendToGTM)
function sendToGTM(e) {
if (window.dataLayers) {
window.dataLayers.push({
event: 'custom_event_' + e.type,
custom_event: {
detail: e.detail[0]
}
})
}
}
});
});
</script>
</body>
</html>