-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
179 lines (139 loc) · 10.3 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!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>Class Scorecard App</title>
<link rel="shortcut icon" href="src/images/favicon.jpg">
<!-- App Main Css -->
<link href="build/css/app.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="bower_components/html5shiv/dist/html5shiv.js"></script>
<script src="bower_components/respond/dest/respond.min.js"></script>
<![endif]-->
</head>
<body data-ng-app="classScorecardApp">
<!-- .main-area -->
<div class="main-area">
<!-- Navbar Header -->
<nav class="navbar navbar-default" data-ng-controller="HeaderController">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#"><span>Class ScoreCard App</span></a>
<button data-toggle="tooltip" data-placement="bottom" title="Clear Localstorage and refresh" type="button" class="btn btn-default navbar-btn btn-c refresh-icon" data-ng-click="clearLocalstorage();">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
</button>
<button data-toggle="tooltip" data-placement="bottom" title="Add new student to List" type="button" class="btn btn-default navbar-btn btn-c" data-ng-click="addNewStudent();">Add Student</button>
</div>
</div><!-- /.container-fluid -->
</nav><!-- /Navbar Header -->
<!-- Content container -->
<div class="container-fluid" data-ng-controller="AppController">
<div class="content">
<div class="row">
<!-- Student List Section -->
<div class="col-sm-8 well">
<table class="table table-hover table-bordered">
<tr class="header-tr">
<th>Student Name<span data-ng-click="sortList('name');" class="glyphicon glyphicon-sort pull-right cursor-p" data-toggle="tooltip" data-placement="top" title="Sort {{sortByNameFlag? 'ascending': 'descending'}} by name" aria-hidden="true"></span></th>
<th>Student Score<span data-ng-click="sortList('score');" class="glyphicon glyphicon-sort pull-right cursor-p" data-toggle="tooltip" data-placement="top" title="Sort {{sortByScoreFlag? 'ascending': 'descending'}} by score" aria-hidden="true"></span></th>
<th class="edit-td">Edit</th>
</tr>
<tr>
<td colspan="3"><input class="form-control" placeholder="global search student by name or score" type="text" data-ng-model="searchText"></td>
</tr>
<tr data-ng-class="student.score < 65? 'danger': 'success'" data-ng-repeat="student in studentList | filter: searchText track by $index">
<td data-ng-bind="student.name"></td>
<td data-ng-bind="student.score"></td>
<td class="edit-td">
<a href="javascript:void 0" data-ng-click="editStudentDetails(student, $index)"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
<a href="javascript:void 0" data-ng-click="deleteStudent(student)"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
</td>
</tr>
</table>
</div><!-- /Student List Section -->
<!-- Class performance section -->
<div id='class-report' class="col-sm-3 well">
<table class="table table-bordered table-hover">
<tr class="header-tr">
<th colspan="3"><h4>Class Performance Report</h4></th>
</tr>
<tr class="header-tr">
<td>Rating</td>
<td>Student Name</td>
<td>Score</td>
</tr>
<tr>
<td class="warning">Min</td>
<td data-ng-bind="summaryReport.min.studentName"></td>
<td data-ng-bind="summaryReport.min.studentScore"></td>
</tr>
<tr>
<td class="warning">Max</td>
<td data-ng-bind="summaryReport.max.studentName"></td>
<td data-ng-bind="summaryReport.max.studentScore"></td>
</tr>
<tr>
<td colspan="2" class="warning">Total Students</td>
<td colspan="1" data-ng-bind="studentList.length"></td>
</tr>
<tr>
<td colspan="2" class="warning">Average Class Score</td>
<td colspan="1" data-ng-bind="summaryReport.avgScore"></td>
</tr>
<tr>
<td class="warning"><span>Legends</span></td>
<td class="danger">Fail (< 65)</td>
<td class="success">Pass (>= 65)</td>
</tr>
</table>
</div><!-- /Class performance section -->
</div>
</div><!-- /Content container -->
<!-- Add/Edit Student Modal Sections -->
<section>
<!-- Modal -->
<div class="modal fade" id="StudentModal" tabindex="-1" role="dialog" aria-labelledby="StudentModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="StudentModalLabel"><p data-ng-show="modalObj.id == null">Add Student Details</p><p data-ng-hide="modalObj.id == null">Edit Student Details</p></h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="title-name" class="control-label">Student Name:</label>
<input type="text" class="form-control" id="title-name" placeholder="Student name here.." data-ng-model="modalObj.name">
</div>
<div class="form-group">
<label for="description-text" class="control-label">Student Score:</label>
<input type="text" class="form-control" id="title-name" placeholder="Student score goes here.." data-ng-model="modalObj.score">
</div>
<div class="error-msg">
{{errorMsg}}
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger pull-left hide" data-dismiss="modal" data-ng-click="deleteStudent()">Delete Student</button>
<button type="button" class="btn btn-primary" data-ng-class="modalObj.id == null? '': 'hide'" data-dismiss="modal" data-ng-click="saveStudentDetails()" data-ng-disabled="!modalObj.name || !modalObj.score || errorMsg">Add Student</button>
<button type="button" class="btn btn-default" data-dismiss="modal" data-ng-class="modalObj.id == null? '': 'hide'">Close</button>
</div>
</div>
</div>
</div><!-- /Modal -->
</section><!-- /Add/Edit Student Modal Section -->
</div><!-- /Content container -->
</div> <!-- /.main-area -->
<!-- Sticky footer -->
<footer class="footer">
<div class="container-fluid footer-div">
<p>Developed by <a href="mailto:[email protected]">Sankalp Lakhina</a></p>
</div>
</footer><!-- Sticky footer -->
<!-- App Main Js -->
<script src="build/js/app.min.js"></script>
</body>
</html>