diff options
author | Prabhu Ramachandran | 2017-03-20 18:51:57 +0530 |
---|---|---|
committer | GitHub | 2017-03-20 18:51:57 +0530 |
commit | a522432ae637c029368f22ccb407089ed34e231e (patch) | |
tree | b7646d505ad79d4dc80d9c49521995c84fe50dc1 /yaksh/static | |
parent | 6a09816d66f9f24c0dba275d0dd3aaf7289eb73b (diff) | |
parent | e0beba1dacb0d5de5ca8b59298345eb9d841d879 (diff) | |
download | online_test-a522432ae637c029368f22ccb407089ed34e231e.tar.gz online_test-a522432ae637c029368f22ccb407089ed34e231e.tar.bz2 online_test-a522432ae637c029368f22ccb407089ed34e231e.zip |
Merge pull request #252 from adityacp/assignment_upload_check
Assignment upload Evaluation
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() |