/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: Gustav Hatvigsson
  • Date: 2013-05-21 12:01:01 UTC
  • mfrom: (82.1.1 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130521120101-ch0ps106uaovyh5u
merged the missing things...

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
}