-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
110 lines (104 loc) · 3.92 KB
/
index.html
File metadata and controls
110 lines (104 loc) · 3.92 KB
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
104
105
106
107
108
109
110
<!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>LokiJs Testing</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<style>
body {
}
.info-text {
font-style: italic;
font-size: 12px;
margin-left: 25px;
}
</style>
<script src="node_modules/lokijs/build/lokijs.min.js"></script>
<script src="node_modules/lokijs/build/loki-indexed-adapter.min.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/">LokiJS testing</a>
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="alert alert-warning">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<strong>Warning!</strong>
The bellow table displays some dummy data used to test LokiJS.
Please check app.js file code and comments for coding details.
</div>
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Gender</th>
<th>Company</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Tags</th>
<th>Favorite fruit</th>
</tr>
</thead>
<tbody id="tableRows">
</tbody>
<tbody>
<tr>
<td><input id="sortByIndex" type="checkbox"></td>
<td><input id="sortByName" type="checkbox"></td>
<td><input id="sortByGender" type="checkbox"></td>
<td><input id="sortByCompany" type="checkbox"></td>
<td><input id="sortByEmail" type="checkbox"></td>
<td><input id="sortByPhone" type="checkbox"></td>
<td><input id="sortByAddress" type="checkbox"></td>
<td><input id="sortByTags" type="checkbox"></td>
<td><input id="sortByFavoriteFruit" type="checkbox"></td>
</tr>
<tr>
<td colspan="9">
<button class="btn btn-small btn-primary" onclick="applySort()">Apply sort</button>
<input type="radio" name="sortOrder" value="0" checked style="margin-left: 25px;"> Asc
<input type="radio" name="sortOrder" value="1" style="margin-left: 25px;"> Desc
<span class="info-text">Sort by selected columns (previous line checkboxes)</span>
</td>
</tr>
<tr>
<td colspan="9">
<div class="alert alert-danger">
<button class="btn btn-sm btn-danger" onclick="deleteDb()">Delete LokiDB</button>
<span class="info-text">
After you delete lokiDB reload the page and check console logs (the DB data will be
reinitialized after ajax request to get dummy data is complete).
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info">
<h3>LokiDB Catalog Summary:</h3>
<div>
<ul id="lokiDbcatalog"></ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html>