From e1e334964aaaed89e7e6d85094048518cb7ad88c Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Sat, 8 Aug 2020 00:56:26 +0530 Subject: Add select all checkbox in design qp for fixed questions. --- yaksh/static/yaksh/js/question_paper_creation.js | 34 +++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/question_paper_creation.js b/yaksh/static/yaksh/js/question_paper_creation.js index 9d04728..871d6cc 100644 --- a/yaksh/static/yaksh/js/question_paper_creation.js +++ b/yaksh/static/yaksh/js/question_paper_creation.js @@ -57,7 +57,38 @@ $(document).ready(function(){ $('#design_q').submit(function(eventObj) { $(this).append(''); return true; -}); + }); + + $('#add_checkall').change(function () { + if($(this).prop("checked")) { + $("#fixed-available input:checkbox").each(function(index, element) { + if(isNaN($(this).val())) {return}; + $(this).prop("checked", true); + checked_vals.push(parseInt($(this).val())) + }); + } else { + $("#fixed-available input:checkbox").each(function(index, element){ + $(this).prop('checked', false); + checked_vals.pop(parseInt($(this).val())); + }); + } + }); + + $('#remove_checkall').change(function () { + if($(this).prop("checked")) { + $("#fixed-added input:checkbox").each(function (index, element) { + if(isNaN($(this).val())) { return }; + $(this).prop('checked', true); + checked_vals.push(parseInt($(this).val())); + }); + } else { + $("#fixed-added input:checkbox").each(function (index, element) { + console.log('unchecked'); + $(this).prop('checked', false); + checked_vals.pop(parseInt($(this).val())); + }); + } + }); });//document function append_tag(tag){ @@ -69,3 +100,4 @@ function append_tag(tag){ tag_name.value = tag.value; } } + -- cgit From 42dda2d828915f0f79dcdd816984489238661ebd Mon Sep 17 00:00:00 2001 From: adityacp Date: Thu, 27 Aug 2020 18:30:06 +0530 Subject: fix iframe css --- yaksh/static/yaksh/css/custom.css | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css index f995c61..7756478 100644 --- a/yaksh/static/yaksh/css/custom.css +++ b/yaksh/static/yaksh/css/custom.css @@ -131,3 +131,9 @@ body, .dropdown-menu { #question_card { border: none; } + + +iframe { + display:block; + width:100%; +} -- cgit From e3c3a0d9f7819f851890ea2611ba12b4f6255f06 Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 28 Aug 2020 11:26:51 +0530 Subject: fix design question paper views and tests --- yaksh/static/yaksh/js/question_paper_creation.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/question_paper_creation.js b/yaksh/static/yaksh/js/question_paper_creation.js index 871d6cc..1159dd3 100644 --- a/yaksh/static/yaksh/js/question_paper_creation.js +++ b/yaksh/static/yaksh/js/question_paper_creation.js @@ -59,7 +59,7 @@ $(document).ready(function(){ return true; }); - $('#add_checkall').change(function () { + $('#add_checkall').on("change", function () { if($(this).prop("checked")) { $("#fixed-available input:checkbox").each(function(index, element) { if(isNaN($(this).val())) {return}; @@ -74,7 +74,7 @@ $(document).ready(function(){ } }); - $('#remove_checkall').change(function () { + $('#remove_checkall').on("change", function () { if($(this).prop("checked")) { $("#fixed-added input:checkbox").each(function (index, element) { if(isNaN($(this).val())) { return }; @@ -83,7 +83,6 @@ $(document).ready(function(){ }); } else { $("#fixed-added input:checkbox").each(function (index, element) { - console.log('unchecked'); $(this).prop('checked', false); checked_vals.pop(parseInt($(this).val())); }); -- cgit