/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: galaxyAbstractor
  • Date: 2013-04-10 15:49:32 UTC
  • mto: (19.1.5 lenasys)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: galaxyabstractor@gmail.com-20130410154932-4vizlzk0ar5gykvi
* Added an simple admin panel to the codeviewer-cmssy stuff
* Redesigned a bit like the mockups - still stuff to come
* Implemented the codeviewer + admin panel again using the Framework CodeIgniter instead 

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
 
}