From f050dd919d5719874aafadf0a674d816a25bc9eb Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Wed, 29 Apr 2020 22:11:19 +0530 Subject: Fix: #696 --- yaksh/static/yaksh/js/add_question.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js index 6cd8b48..1358710 100644 --- a/yaksh/static/yaksh/js/add_question.js +++ b/yaksh/static/yaksh/js/add_question.js @@ -192,3 +192,30 @@ function autosubmit() } } + +$(document).ready(() => { + let option = $('#id_language').val(); + if(option === 'other') { + $('#id_topic').closest('tr').show(); + } else { + $('#id_topic').closest('tr').hide(); + } + $('#id_language').change(function() { + let value = $(this).val(); + if (value === "other") { + $('#id_topic').closest('tr').show(); + $('#id_type').children("option[value='code']").hide(); + } else { + $('#id_topic').closest('tr').hide(); + $('#id_type').children("option[value='code']").show(); + } + }); + $('#id_type').change(function() { + let value = $(this).val(); + if (value === "code") { + $('#id_language').children("option[value='other']").hide(); + } else { + $('#id_language').children("option[value='other']").show(); + } + }) +}); \ No newline at end of file -- cgit From 31e8b94b8ebf74d77cc8596411c6acfa2112f949 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Mon, 4 May 2020 16:25:50 +0530 Subject: Show question topic and language in quiz --- yaksh/static/yaksh/css/custom.css | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'yaksh/static') diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css index 3979e3e..a9c8e27 100644 --- a/yaksh/static/yaksh/css/custom.css +++ b/yaksh/static/yaksh/css/custom.css @@ -117,4 +117,11 @@ body, .dropdown-menu { .description { font-size: 16px; +} + +/* --------------------------------------------------- + Quiz qusetion style +----------------------------------------------------- */ +#question_card { + border: none; } \ No newline at end of file -- cgit