/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: Gustav Hatvigsson
  • Date: 2013-05-28 11:46:41 UTC
  • mfrom: (83.2.19 pvp)
  • Revision ID: gustav.hartvigsson@gmail.com-20130528114641-jc7sbw7ffajiwnix
Merged Bigestans:s changes:
* Merged trunk AND
* Modified js/login.js and js/bannermenu.js, specifically functions related to the login popup!
Continuing work on viewstudents

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(function(e) {
11
 
                                        e.stopPropagation();
12
 
                                        e.preventDefault();
13
 
                                        $("#popup").fadeOut(300, function() { $(this).remove(); });
14
 
                                });
 
10
                                $("#popup .cancelButton").click(cancelHandler);
15
11
                        }
16
12
                );
17
13
        });
18
14
 
 
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
 
19
37
        $("html").click(function(e) {
20
38
                e.stopPropagation();
21
39
                e.preventDefault();
24
42
 
25
43
        $("#viewStudents table tr:even").addClass("even");
26
44
        $("#viewStudents table tr:odd").addClass("odd");
27
 
});
 
 
b'\\ No newline at end of file'
 
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'