-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.htm
More file actions
95 lines (88 loc) · 3.57 KB
/
index.htm
File metadata and controls
95 lines (88 loc) · 3.57 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
<link href="https://cdn.datatables.net/r/bs-3.3.5/jq-2.1.4,dt-1.10.8/datatables.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
crossorigin="anonymous">
<link href="angularjs-datatables.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<style>
.check-toggle {
cursor: pointer;
color: #555;
}
.selected .check-toggle {
color: white;
}
.check-toggle.fa-check-circle {
color: #090;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js" integrity="sha256-zBy1l2WBAh2vPF8rnjFMUXujsfkKjya0Jy5j6yKj0+Q="
crossorigin="anonymous"></script>
<script src="angularjs-datatables.js"></script>
<script src="app.js"></script>
<body ng-app="app" ng-controller="main" ng-cloak>
<div style="padding: 10px; padding-top: 0;">
<button class="btn btn-default" ng-click="markSelected()" ng-disabled="!selected.size">
Mark Selected
</button>
<button class="btn btn-default" ng-click="deleteSelected()" ng-disabled="!selected.size">
Delete Selected
</button>
</div>
<div style="padding: 10px 15px; padding-top: 0;">
<label style="font-weight: normal;">
Birthday range start:
<br>
<input type="date" ng-model="filters.startDate" class="form-control">
</label>
<label style="font-weight: normal;">
Birthday range end:
<br>
<input type="date" ng-model="filters.endDate" class="form-control">
</label>
<label style="font-weight: normal;">
Country:
<br>
<select ng-model="filters.country" class="form-control">
<option value="">All</option>
<option ng-repeat="country in countries">{{country}}</option>
</select>
</label>
<label style="font-weight: normal;">
Marked:
<br>
<select ng-model="filters.marked" class="form-control">
<option value="">All</option>
<option>Marked</option>
<option>Unmarked</option>
</select>
</label>
</div>
<!-- Note: filteredNames only exists if doing custom filters -->
<table class="table table-striped table-bordered dataTable" ng-rows="filteredNames" ng-selected="selected">
<thead>
<tr>
<th ng-sortable>ID</th>
<th ng-sortable>Birthday</th>
<th ng-sortable>First Name</th>
<th ng-sortable>Last Name</th>
<th ng-sortable>Country</th>
<th ng-sortable>Net Worth</th>
<th ng-sortable>Marked</th>
</tr>
</thead>
<tbody>
<tr ng-row>
<td>{{row.id}}</td>
<td>{{row.birthday | date : 'shortDate'}}</td>
<td>{{row.firstName}}</td>
<td>{{row.lastName}}</td>
<td>{{row.country}}</td>
<td ng-click="markSelected()">{{row.netWorth | customCurrency}}</td>
<td ng-data="row.marked" style="text-align: center" ng-click="mark(row)">
<!-- ctrl refers to the controller defined in app.js -->
<i class="far fa-2x check-toggle" ng-class="{'fa-check-circle': row.marked, 'fa-circle': !row.marked}"></i>
</td>
</tr>
</tbody>
</table>
</body>