1
$(document).ready(function() {
3
$("#addStudentButton").click(function(e) {
7
"ajax/popup/addStudents",
9
$("#popup").fadeIn(300).click(function(e) {e.stopPropagation();});
10
$("#popup .cancelButton").click(cancelHandler);
15
$(".editStudentDetailsButton").click(function(e) {
19
var username = $(this).parent().prevAll(".username").html();
20
var name = $(this).parent().prevAll(".name").html();
21
var email = $(this).parent().prevAll(".email").html();
24
"ajax/popup/editStudentDetails",
26
$("#popup #usernameDisplay").html(username);
27
$("#popup #username").val(username);
28
$("#popup #studentName").val(name);
29
$("#popup #studentEmail").val(email);
30
$("#popup").fadeIn(300).click(function(e){e.stopPropagation();});
31
$("#popup .cancelButton").click(cancelHandler);
37
$("html").click(function(e) {
40
$("#popup").fadeOut(300, function() { $(this).html("")});
43
$("#viewStudents table tr:even").addClass("even");
44
$("#viewStudents table tr:odd").addClass("odd");
47
function cancelHandler(e) {
50
$("#popup").fadeOut(300, function() { $(this).find(".popup").remove(); });
b'\\ No newline at end of file'