/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/js/viewStudents.js

  • Committer: a11andoh
  • Date: 2013-05-28 09:50:55 UTC
  • mfrom: (112 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 115.
  • Revision ID: a11andoh@student.his.se-20130528095055-3ig3yvqebh08vmgz
blurp

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
                        "ajax/popup/addStudents",
8
8
                        function() {
9
9
                                $("#popup").fadeIn(300).click(function(e) {e.stopPropagation();});
10
 
                                $("#popup .cancelButton").click(cancelHandler);
 
10
                                $("#popup .cancelButton").click(function(e) {
 
11
                                        e.stopPropagation();
 
12
                                        e.preventDefault();
 
13
                                        $("#popup").fadeOut(300, function() { $(this).remove(); });
 
14
                                });
11
15
                        }
12
16
                );
13
17
        });
14
18
 
15
 
        $(".editStudentDetailsButton").click(function(e) {
16
 
                e.stopPropagation();
17
 
                e.preventDefault();
18
 
 
19
 
                var username = $(this).parent().prevAll(".username").html();
20
 
                var name = $(this).parent().prevAll(".name").html();
21
 
                var email = $(this).parent().prevAll(".email").html();
22
 
 
23
 
                $("#popup").load(
24
 
                        "ajax/popup/editStudentDetails",
25
 
                        function() {
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);
32
 
                        }
33
 
                )
34
 
 
35
 
        });
36
 
 
37
19
        $("html").click(function(e) {
38
20
                e.stopPropagation();
39
21
                e.preventDefault();
42
24
 
43
25
        $("#viewStudents table tr:even").addClass("even");
44
26
        $("#viewStudents table tr:odd").addClass("odd");
45
 
});
46
 
 
47
 
function cancelHandler(e) {
48
 
        e.stopPropagation();
49
 
        e.preventDefault();
50
 
        $("#popup").fadeOut(300, function() { $(this).find(".popup").remove(); });
51
 
}
 
 
b'\\ No newline at end of file'
 
27
});
 
 
b'\\ No newline at end of file'