summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/js/course.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/yaksh/static/yaksh/js/course.js b/yaksh/static/yaksh/js/course.js
new file mode 100644
index 0000000..3a21f0d
--- /dev/null
+++ b/yaksh/static/yaksh/js/course.js
@@ -0,0 +1,38 @@
+$(document).ready(function(){
+$(".checkall").click( function(){
+ if($(this).attr("checked")) {
+ $("#enroll-all input:checkbox").each(function(index, element) {
+ $(this).attr('checked', true);
+ });
+ }
+ else {
+ $("#enroll-all input:checkbox").each(function(index, element) {
+ $(this).attr('checked', false);
+ });
+ }
+ });
+$(".enroll").click( function(){
+ if($(this).attr("checked")) {
+ $("#enroll input:checkbox").each(function(index, element) {
+ $(this).attr('checked', true);
+ });
+ }
+ else {
+ $("#enroll input:checkbox").each(function(index, element) {
+ $(this).attr('checked', false);
+ });
+ }
+ });
+$(".reject").click( function(){
+ if($(this).attr("checked")) {
+ $("#reject input:checkbox").each(function(index, element) {
+ $(this).attr('checked', true);
+ });
+ }
+ else {
+ $("#reject input:checkbox").each(function(index, element) {
+ $(this).attr('checked', false);
+ });
+ }
+ });
+});