From 70c28a87d0768df6d68e7098741c49f68a11ec50 Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 18 Nov 2016 09:32:18 +0530 Subject: fixed tooltip and Show files which are not hidden for a question --- yaksh/static/yaksh/js/course.js | 24 ++++++++++++------------ yaksh/static/yaksh/js/question_filter.js | 8 ++++---- yaksh/templates/yaksh/add_question.html | 7 +++++-- yaksh/templates/yaksh/question.html | 9 +++++---- 4 files changed, 26 insertions(+), 22 deletions(-) (limited to 'yaksh') diff --git a/yaksh/static/yaksh/js/course.js b/yaksh/static/yaksh/js/course.js index 3a21f0d..5b79e68 100644 --- a/yaksh/static/yaksh/js/course.js +++ b/yaksh/static/yaksh/js/course.js @@ -1,37 +1,37 @@ $(document).ready(function(){ -$(".checkall").click( function(){ - if($(this).attr("checked")) { +$(".checkall").change( function(){ + if($(this).prop("checked")) { $("#enroll-all input:checkbox").each(function(index, element) { - $(this).attr('checked', true); + $(this).prop('checked', true); }); } else { $("#enroll-all input:checkbox").each(function(index, element) { - $(this).attr('checked', false); + $(this).prop('checked', false); }); } }); -$(".enroll").click( function(){ - if($(this).attr("checked")) { +$(".enroll").change( function(){ + if($(this).prop("checked")) { $("#enroll input:checkbox").each(function(index, element) { - $(this).attr('checked', true); + $(this).prop('checked', true); }); } else { $("#enroll input:checkbox").each(function(index, element) { - $(this).attr('checked', false); + $(this).prop('checked', false); }); } }); -$(".reject").click( function(){ - if($(this).attr("checked")) { +$(".reject").change( function(){ + if($(this).prop("checked")) { $("#reject input:checkbox").each(function(index, element) { - $(this).attr('checked', true); + $(this).prop('checked', true); }); } else { $("#reject input:checkbox").each(function(index, element) { - $(this).attr('checked', false); + $(this).prop('checked', false); }); } }); diff --git a/yaksh/static/yaksh/js/question_filter.js b/yaksh/static/yaksh/js/question_filter.js index 065b06b..aa3a229 100644 --- a/yaksh/static/yaksh/js/question_filter.js +++ b/yaksh/static/yaksh/js/question_filter.js @@ -32,15 +32,15 @@ $(document).ready(function(){ question_filter() }); - $("#checkall").live("click", function(){ - if($(this).attr("checked")) { + $("#checkall").change(function(){ + if($(this).prop("checked")) { $("#filtered-questions input:checkbox").each(function(index, element) { - $(this).attr('checked', true); + $(this).prop('checked', true); }); } else { $("#filtered-questions input:checkbox").each(function(index, element) { - $(this).attr('checked', false); + $(this).prop('checked', false); }); } }); diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 9822333..e1b05fe 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -27,11 +27,14 @@