-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
202 lines (190 loc) · 17.1 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>UIC GPA Calculator</title>
<!-- Bootstrap core CSS -->
<link href="https://lib.baomitu.com/twitter-bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1 class="my-3">我的小目标</h1>
<p class="text-muted">UIC GPA Calculator 2.0</p>
<form action="result/index.html" method="get">
<div class="row">
<div class="col-md">
<div class="form-group">
<label for="currentSemesterSelect1">Current Semester</label>
<select class="form-control" id="currentSemesterSelect1" name="current_sem" required>
<option value="" disabled selected hidden>Please Choose...</option>
<option value="1">大一上学期</option>
<option value="2">大一下学期</option>
<option value="3">大二上学期</option>
<option value="4">大二下学期</option>
<option value="5">大三上学期</option>
<option value="6">大三下学期</option>
<option value="7">大四上学期</option>
<option value="8" disabled>大四下学期</option>
</select>
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="currentSemesterGPAInput">Current cGPA</label>
<input type="number" max="4.0" min="0.0" step="0.01"
class="form-control" id="currentSemesterGPAInput"
placeholder="e.g.: 2.93" name="current_gpa" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md">
<div class="form-group">
<label for="aimSemesterSelect1">Aim Semester</label>
<select class="form-control" id="aimSemesterSelect1" name="aim_sem" required>
<option value="" disabled selected hidden>Please Choose...</option>
<option value="1">大一上学期</option>
<option value="2">大一下学期</option>
<option value="3">大二上学期</option>
<option value="4">大二下学期</option>
<option value="5">大三上学期</option>
<option value="6">大三下学期</option>
<option value="7">大四上学期</option>
<option value="8">大四下学期</option>
</select>
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="aimSemesterGPAInput">Aim cGPA</label>
<input type="number" max="4.0" min="0.0" step="0.01"
class="form-control" id="aimSemesterGPAInput"
placeholder="e.g.: 3.45" name="aim_gpa" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md">
<div class="form-group">
<label for="admissionYearSelector">Admission Year</label>
<select class="form-control" id="admissionYearSelector" name="admission_year" required>
<option value="default" selected>Default</option>
<option value="2017">2017</option>
<option value="2016">2016</option>
<option value="2015">2015</option>
</select>
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="majorSelector">Major</label>
<select class="form-control" id="majorSelector" name="major" required>
<option value="DEFAULT" selected>Default</option>
<optgroup label="Division of Business and Management">
<option value="ACCT">Accounting</option>
<option value="FIN">Finance</option>
<option value="AE">Applied Economics</option>
<option value="MHR">Management of Human Resources</option>
<option value="MKT">Marketing Management</option>
<option value="EBIS">Business Management and Information Systems</option>
<option value="EPIN">Entrepreneurship and Innovation</option>
</optgroup>
<optgroup label="Division of Culture and Creativity">
<option value="MAD">Media Arts and Design</option>
<option value="CTV">Cinema and Television</option>
<option value="CCM">Culture, Creativity and Management*</option>
</optgroup>
<optgroup label="Division of Humanities and Social Sciences">
<option value="ATS">Applied Translation Studies</option>
<option value="CELL">Contemporary English Language and Literature</option>
<option value="ELLS">English Language and Literature Studies </option>
<option value="GIR">Government and International Relations</option>
<option value="IJ">International Journalism</option>
<option value="PRA">Public Relations and Advertising</option>
<option value="SWSA">Social Work and Social Administration</option>
<option value="TESL">Teaching English as a Second Language</option>
</optgroup>
<optgroup label="Division of Science and Technology">
<option value="APSY">Applied Psychology</option>
<option value="CST">Computer Science and Technology</option>
<option value="DS">Data Science</option>
<option value="ENVS">Environmental Science</option>
<option value="FM">Financial Mathematics</option>
<option value="FST">Food Science and Technology</option>
<option value="STAT">Statistics</option>
</optgroup>
</select>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col">
<a id="advanced_mode_btn" href="#" class="btn btn-secondary btn-sm mb-2">Advanced Mode</a>
</div>
</div>
<div class="row" id="advanced" style="display: none;">
<div class="col-md">
<div class="form-group">
<label for="addedUnits">Any add-on or transfer units?</label>
<input type="number" min="0" step="1"
class="form-control" id="addedUnits"
name="added_units" placeholder="0">
</div>
</div>
<div class="col-md">
<div class="form-group">
<label for="droppedUnits">Any dropped course? (please input the total units)</label>
<input type="number" min="0" step="1"
class="form-control" id="droppedUnits"
name="dropped_units" placeholder="0">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary mb-2 mt-3">Submit</button>
</form>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script>
<script src="https://lib.baomitu.com/popper.js/2.11.4/cjs/popper.min.js"></script>
<script src="https://lib.baomitu.com/twitter-bootstrap/5.1.3/js/bootstrap.min.js"></script>
<script>
$('#advanced_mode_btn').click(function () {
$('#advanced').fadeIn();
$(this).removeClass('btn-secondary');
$(this).addClass('btn-outline-secondary');
});
var major_units = $.parseJSON("{\"ACCT\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"FIN\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"AE\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"MHR\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"MKT\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"EBIS\":{\"2015\":null,\"2016\":null,\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6}},\"EPIN\":{\"2015\":null,\"2016\":null,\"2017\":null,\"2018\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6}},\"CTV\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"CCM\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2017\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"MAD\":{\"2015\":null,\"2016\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2017\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"ATS\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"CELL\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":null,\"2017\":null,\"2018\":null},\"ELLS\":{\"2015\":null,\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"GIR\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"IJ\":{\"2015\":{\"1\":17,\"2\":17,\"3\":18,\"4\":20,\"5\":19,\"6\":16,\"7\":17,\"8\":8},\"2016\":{\"1\":17,\"2\":17,\"3\":18,\"4\":20,\"5\":19,\"6\":16,\"7\":17,\"8\":8},\"2017\":{\"1\":17,\"2\":17,\"3\":18,\"4\":20,\"5\":19,\"6\":16,\"7\":17,\"8\":8},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"PRA\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"SWSA\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":9},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":9},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":21,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"TESL\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":null,\"2017\":null,\"2018\":null},\"APSY\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"CST\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":20,\"5\":19,\"6\":19,\"7\":15,\"8\":6},\"2016\":{\"1\":17,\"2\":18,\"3\":19,\"4\":20,\"5\":18,\"6\":19,\"7\":15,\"8\":6},\"2017\":{\"1\":17,\"2\":18,\"3\":19,\"4\":20,\"5\":18,\"6\":19,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"DS\":{\"2015\":null,\"2016\":null,\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":20,\"5\":19,\"6\":19,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"ENVS\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"FM\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":20,\"2\":20,\"3\":19,\"4\":16,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2017\":{\"1\":20,\"2\":20,\"3\":19,\"4\":16,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"FST\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":9},\"2016\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2017\":{\"1\":17,\"2\":20,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":15,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}},\"STAT\":{\"2015\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2016\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2017\":{\"1\":17,\"2\":17,\"3\":19,\"4\":19,\"5\":18,\"6\":18,\"7\":18,\"8\":6},\"2018\":{\"1\":null,\"2\":null,\"3\":null,\"4\":null,\"5\":null,\"6\":null,\"7\":null,\"8\":null}}}")
// disable selections in "aim semester selector"
$("#currentSemesterSelect1").change(function () {
let startNumber = $(this).val();
$('#aimSemesterSelect1 option').each(function () {
$(this).attr("disabled", false) // reset all
});
$('#aimSemesterSelect1 option').each(function () {
if($(this).val() <= startNumber){
$(this).attr("disabled", true)
}
});
});
$("#currentSemesterGPAInput").change(function () {
if($(this).val() >= 0.0 && $(this).val() <= 4.0){
return true;
}else{
$(this).val("");
}
});
$("#aimSemesterGPAInput").change(function () {
if($(this).val() >= 0.0 && $(this).val() <= 4.0){
return true;
}else{
$(this).val("");
}
});
</script>
</body>
</html>