/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/manageCourses.js

  • Committer: a10rolch
  • Date: 2013-05-21 11:55:57 UTC
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: a10rolch@student.his.se-20130521115557-szrkzvgpjano4z7a
- Added manageCoursesBody.css
- Added manageCourses.js

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Functions */
 
2
$(document).ready(function(){
 
3
        //$('#addCourse').hide();
 
4
        $('#editCourse').hide();
 
5
        
 
6
        $('body').click(function(e){
 
7
                $('#addCourse').hide();
 
8
                $('#editCourse').hide();
 
9
        });     
 
10
        
 
11
        $('#addCourse').click(function(e){
 
12
                e.stopPropagation();
 
13
        });     
 
14
        $('#editCourse').click(function(e){
 
15
                e.stopPropagation();
 
16
        });     
 
17
        
 
18
        
 
19
        $('#addCoursebutton').click(function(e){
 
20
                var target = $('#addCourse');
 
21
                if(target.is(":hidden")){
 
22
                        target.fadeIn(300);
 
23
                        e.stopPropagation();
 
24
                }
 
25
                else{
 
26
                        target.fadeOut(300);
 
27
                }
 
28
                
 
29
        });
 
30
        
 
31
        $('.manageCourseButton').click(function(e){
 
32
                var target = $('#editCourse');
 
33
                if(target.is(":hidden")){
 
34
                        target.fadeIn(300);
 
35
                        e.stopPropagation();
 
36
                }
 
37
                else{
 
38
                        target.fadeOut(300);
 
39
                }
 
40
                
 
41
        });
 
42
 
 
43
});
 
44
 
 
45
window.onkeyup = function(event){
 
46
        if(event.keyCode==27){
 
47
                $('#addCourse').fadeOut(300);
 
48
        }
 
49
}