/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
82.1.1 by a10rolch
- Added manageCoursesBody.css
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
}