summaryrefslogtreecommitdiff
path: root/yaksh/static
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-05-18 16:29:04 +0530
committerGitHub2020-05-18 16:29:04 +0530
commit5c57dd3ab185d5d0ad39240180e98d4a3131daa5 (patch)
treea6ba3348f82f596a9d54b5a3cc63aa1eff83229b /yaksh/static
parentdb456ca53778c720ee597e3fcf7814c623bc32fd (diff)
parent61d4096697a84873473ad28afb0dc79f211a54b3 (diff)
downloadonline_test-5c57dd3ab185d5d0ad39240180e98d4a3131daa5.tar.gz
online_test-5c57dd3ab185d5d0ad39240180e98d4a3131daa5.tar.bz2
online_test-5c57dd3ab185d5d0ad39240180e98d4a3131daa5.zip
Merge pull request #697 from CruiseDevice/change-create_question
Fix: #696
Diffstat (limited to 'yaksh/static')
-rw-r--r--yaksh/static/yaksh/css/custom.css7
-rw-r--r--yaksh/static/yaksh/js/add_question.js27
2 files changed, 33 insertions, 1 deletions
diff --git a/yaksh/static/yaksh/css/custom.css b/yaksh/static/yaksh/css/custom.css
index 697361d..f995c61 100644
--- a/yaksh/static/yaksh/css/custom.css
+++ b/yaksh/static/yaksh/css/custom.css
@@ -125,4 +125,9 @@ body, .dropdown-menu {
.description {
font-size: 16px;
}
->>>>>>> 53a0c4ad3e733f3960000527f83565f2fd8fc412
+/* ---------------------------------------------------
+ Quiz question style
+----------------------------------------------------- */
+#question_card {
+ border: none;
+}
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