forked from NuCivic/openfda.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
103 lines (86 loc) · 3.6 KB
/
example.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
<!DOCTYPE html>
<head>
<title>OpenFDA.js Example</title>
<link rel="stylesheet" href="vendor/bootstrap/3.2.0/css/bootstrap.css">
<!-- vendor css -->
<link href="vendor/leaflet/0.7.3/leaflet.css" rel="stylesheet">
<link href="vendor/leaflet.markercluster/MarkerCluster.css" rel="stylesheet">
<link href="vendor/leaflet.markercluster/MarkerCluster.Default.css" rel="stylesheet">
<link rel="stylesheet" href="vendor/slickgrid/2.2/slick.grid.css">
<!-- recline css -->
<link href="css/map.css" rel="stylesheet">
<link href="css/multiview.css" rel="stylesheet">
<link href="css/slickgrid.css"rel="stylesheet">
<link href="css/flot.css" rel="stylesheet">
<!-- Vendor JS - general dependencies -->
<script src="vendor/jquery/1.7.1/jquery.js" type="text/javascript"></script>
<script src="vendor/underscore/1.4.4/underscore.js" type="text/javascript"></script>
<script src="vendor/backbone/1.0.0/backbone.js" type="text/javascript"></script>
<script src="vendor/mustache/0.5.0-dev/mustache.js" type="text/javascript"></script>
<script src="vendor/bootstrap/3.2.0/js/bootstrap.js" type="text/javascript"></script>
<!-- Vendor JS - view dependencies -->
<script src="vendor/leaflet/0.7.3/leaflet.js" type="text/javascript"></script>
<script src="vendor/leaflet.markercluster/leaflet.markercluster.js" type="text/javascript"></script>
<script type="text/javascript" src="vendor/flot/jquery.flot.js"></script>
<script type="text/javascript" src="vendor/flot/jquery.flot.time.js"></script>
<script type="text/javascript" src="vendor/moment/2.0.0/moment.js"></script>
<script src="vendor/slickgrid/2.2/jquery-ui-1.8.16.custom.min.js"></script>
<script src="vendor/slickgrid/2.2/jquery.event.drag-2.2.js"></script>
<script src="vendor/slickgrid/2.2/jquery.event.drop-2.2.js"></script>
<script src="vendor/slickgrid/2.2/slick.core.js"></script>
<script src="vendor/slickgrid/2.2/slick.formatters.js"></script>
<script src="vendor/slickgrid/2.2/slick.editors.js"></script>
<script src="vendor/slickgrid/2.2/slick.grid.js"></script>
<script src="vendor/slickgrid/2.2/plugins/slick.rowselectionmodel.js" type="text/javascript"></script>
<script src="vendor/slickgrid/2.2/plugins/slick.rowmovemanager.js" type="text/javascript"></script>
<!-- Recline JS (combined distribution, all views) -->
<script src="dist/recline.js" type="text/javascript"></script>
</head>
<body>
<h1>Test</h1>
<div class="container">
<style type="text/css">
.recline-slickgrid {
height: 300px;
}
.changelog {
display: none;
border-bottom: 1px solid #ccc;
margin-bottom: 10px;
}
</style>
<div class="changelog">
<h3>Changes</h3>
</div>
<div class="data-explorer-here"></div>
<div style="clear: both;"></div>
<script type="text/javascript" src="openfda.js"></script>
<script type="text/javascript" src="view.js"></script>
<script type="text/javascript">
;(function($) {
'use strict';
$(document).on('ready', function(){
var backend = {
type: 'drug', // drug, device, food
area: 'event' // event, label, enforcement for drug
} // event, enforcement for device
// enforcement for food
OpenFDA.fetch(backend).done(function(out) {
console.log(out);
});
OpenFDA.query({
search: 'patient.drug.openfda.pharm_class_epc:"nonsteroidal+anti-inflammatory+drug"',
count: 'patient.reaction.reactionmeddrapt.exact',
limit: 10,
skip: 0,
filters: [
]
}, backend).done(function(out) {
createMultiView(out);
});
});
})(jQuery);
</script>
</div>
</body>
</html>