forked from daniepaul/dp-data-table
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (63 loc) · 2.51 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dpDataTable Demo</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>dp Data Table</h1>
<p>dp Data Table provides out-of-box functionality to build your data table faster. Bind the data and it just
works.</p>
<div id="data-table-1">Loading React Component.</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.slim.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.0/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.0/react-dom.js"></script>
<script src="MOCK_DATA.js"></script>
<script>
function onEdit(e) {
alert("Edit item " + e.index + " whose value is \n" + JSON.stringify(e.item, undefined, 2))
}
function onDelete(e) {
alert("Delete item " + e.index + " whose value is \n" + JSON.stringify(e.item, undefined, 2))
}
function onRowClick(e) {
console.log(e)
}
function onItemsChange(e) {
console.info(e.changeReason);
}
</script>
<script src="dist/dpDataTable.js"></script>
<script>
window.RenderDpDataTable({
showActionCol: true,
selector: '#data-table-1',
items: MOCK_DATA,
headers: {
'auditTerritory': 'Audit Territory',
'auditor': 'Auditor Name',
'notStarted': 'Not Started',
'inProgress': 'In Progress',
'unable': 'Could Not Complete',
'research': 'Needs More Research',
'approved': 'Approved'
},
sortableFields: ['auditTerritory', 'auditor', 'notStarted', 'inProgress', 'unable', 'research', 'approved'],
showFilter: true,
showSort: true,
auditSummaryTotalRow: {"auditorId":"","auditor":"","auditTerritory":"","inProgress":11,"review":5,"unable":5,"research":1,"approved":5,"notStarted":648},
defaultSort: 'date',
onRowClick: onRowClick,
onItemsChange: onItemsChange
});
</script>
</body>
</html>