diff options
author | adityacp | 2017-03-15 17:55:34 +0530 |
---|---|---|
committer | adityacp | 2017-03-15 17:55:34 +0530 |
commit | 5e500f3344a13d375d018312936280d88d47c93c (patch) | |
tree | 3a0375d11eafdd25e70e96914c518bd54e532b4e /yaksh/static | |
parent | f1eb06d3740eb21558576e5f5489972e45cab038 (diff) | |
download | online_test-5e500f3344a13d375d018312936280d88d47c93c.tar.gz online_test-5e500f3344a13d375d018312936280d88d47c93c.tar.bz2 online_test-5e500f3344a13d375d018312936280d88d47c93c.zip |
Change templates and js
- Support multiple files uploading in assignment
- Create new check field to grade assignement based question
- Add js changes
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/add_question.js | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js index 8ca22eb..05752b4 100644 --- a/yaksh/static/yaksh/js/add_question.js +++ b/yaksh/static/yaksh/js/add_question.js @@ -111,16 +111,34 @@ function textareaformat() }); - $('#id_type').bind('focus', function(event){ - var type = document.getElementById('id_type'); - type.style.border = '1px solid #ccc'; - }); + $('#id_type').bind('focus', function(event){ + var type = document.getElementById('id_type'); + type.style.border = '1px solid #ccc'; + }); + + $('#id_language').bind('focus', function(event){ + var language = document.getElementById('id_language'); + language.style.border = '1px solid #ccc'; + }); + document.getElementById('my').innerHTML = document.getElementById('id_description').value ; - $('#id_language').bind('focus', function(event){ - var language = document.getElementById('id_language'); - language.style.border = '1px solid #ccc'; - }); - document.getElementById('my').innerHTML = document.getElementById('id_description').value ; + + if (document.getElementById('id_grade_assignment_upload').checked || + document.getElementById('id_type').val() == 'upload'){ + $("#id_grade_assignment_upload").prop("disabled", false); + } + else{ + $("#id_grade_assignment_upload").prop("disabled", true); + } + + $('#id_type').change(function() { + if ($(this).val() == "upload"){ + $("#id_grade_assignment_upload").prop("disabled", false); + } + else{ + $("#id_grade_assignment_upload").prop("disabled", true); + } + }); } function autosubmit() |