bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
82.1.1
by a10rolch
- Added manageCoursesBody.css |
1 |
/* Functions */
|
2 |
$(document).ready(function(){ |
|
3 |
$('body').click(function(e){ |
|
83.2.1
by elof.bigestans at gmail
Fixed various bugs in the ManageCourses function |
4 |
$('#addCourse').fadeOut(300); |
5 |
$('#editCourse').fadeOut(300); |
|
82.1.1
by a10rolch
- Added manageCoursesBody.css |
6 |
}); |
7 |
|
|
8 |
$('#addCourse').click(function(e){ |
|
9 |
e.stopPropagation(); |
|
10 |
}); |
|
11 |
$('#editCourse').click(function(e){ |
|
12 |
e.stopPropagation(); |
|
13 |
}); |
|
14 |
|
|
15 |
|
|
83.2.1
by elof.bigestans at gmail
Fixed various bugs in the ManageCourses function |
16 |
$('#addCourseButton').click(function(e){ |
82.1.1
by a10rolch
- Added manageCoursesBody.css |
17 |
var target = $('#addCourse'); |
18 |
if(target.is(":hidden")){ |
|
19 |
target.fadeIn(300); |
|
20 |
e.stopPropagation(); |
|
21 |
} |
|
22 |
else{ |
|
23 |
target.fadeOut(300); |
|
24 |
} |
|
25 |
|
|
26 |
}); |
|
27 |
|
|
28 |
$('.manageCourseButton').click(function(e){ |
|
29 |
var target = $('#editCourse'); |
|
30 |
if(target.is(":hidden")){ |
|
83.2.1
by elof.bigestans at gmail
Fixed various bugs in the ManageCourses function |
31 |
|
32 |
var courseID = $(this).parent().prevAll(".courseID").html(); |
|
33 |
var courseName = $(this).parent().prevAll(".courseName").html(); |
|
34 |
var courseData = $(this).parent().prevAll(".courseData").html(); |
|
35 |
||
36 |
showManageCourse(courseID, courseName, courseData); |
|
82.1.1
by a10rolch
- Added manageCoursesBody.css |
37 |
e.stopPropagation(); |
38 |
} |
|
39 |
else{ |
|
40 |
target.fadeOut(300); |
|
41 |
} |
|
42 |
|
|
43 |
}); |
|
44 |
||
83.2.1
by elof.bigestans at gmail
Fixed various bugs in the ManageCourses function |
45 |
$(".cancelButton").click(function(e) { |
46 |
$(this).closest(".manageCoursePopup").fadeOut(300); |
|
47 |
e.preventDefault(); |
|
48 |
e.stopPropagation(); |
|
49 |
}); |
|
50 |
||
51 |
$("#manageCourses table tr:odd").addClass("odd"); |
|
52 |
$("#manageCourses table tr:even").addClass("even"); |
|
53 |
||
82.1.1
by a10rolch
- Added manageCoursesBody.css |
54 |
});
|
55 |
||
83.2.1
by elof.bigestans at gmail
Fixed various bugs in the ManageCourses function |
56 |
function showManageCourse(courseID, courseName, courseData) { |
57 |
$("#editCourse").fadeIn(300); |
|
58 |
$("#editCourse #editCourseName").attr("value", courseName); |
|
59 |
$("#editCourse span").html(courseID); |
|
60 |
$("#editCourse #editCourseID").attr("value", courseID) |
|
61 |
$("#editCourse #editCourseData").attr("value", courseData); |
|
62 |
}
|
|
63 |
||
82.1.1
by a10rolch
- Added manageCoursesBody.css |
64 |
window.onkeyup = function(event){ |
65 |
if(event.keyCode==27){ |
|
66 |
$('#addCourse').fadeOut(300); |
|
67 |
} |
|
68 |
}
|