diff options
author | Hardik Ghaghada | 2013-04-26 16:40:34 +0530 |
---|---|---|
committer | Hardik Ghaghada | 2013-04-26 16:40:34 +0530 |
commit | c8b68813ca80aee16261e5f02d541ed48712feae (patch) | |
tree | 85ee9038f09b7aab4fb1b57cbb444108736f708e /testapp/templates/exam/add_questionpaper.html | |
parent | 1dd9573cfaa0587cd3217495847a0b456ceb6223 (diff) | |
download | online_test-c8b68813ca80aee16261e5f02d541ed48712feae.tar.gz online_test-c8b68813ca80aee16261e5f02d541ed48712feae.tar.bz2 online_test-c8b68813ca80aee16261e5f02d541ed48712feae.zip |
Dumped JS from HTML pages to separate JS files
Diffstat (limited to 'testapp/templates/exam/add_questionpaper.html')
-rw-r--r-- | testapp/templates/exam/add_questionpaper.html | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/testapp/templates/exam/add_questionpaper.html b/testapp/templates/exam/add_questionpaper.html index 664093c..4cce8a9 100644 --- a/testapp/templates/exam/add_questionpaper.html +++ b/testapp/templates/exam/add_questionpaper.html @@ -10,36 +10,11 @@ {% block script %} <script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script> <script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script> - -<script> -function load_data() -{ - var value = document.getElementById('mode').value; - var pathArray = window.location.pathname.split( '/' ); - length = pathArray.length; - var digit = parseInt(pathArray[length-2]); - - if (! isNaN(digit) && value == 'Automatic') - { - window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic/" + digit; - } - else if(!isNaN(digit) && value == 'Manual') - { - window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual/" + digit; - } - else if(value == 'Automatic') - { - window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic"; - } - else if( value == 'Manual') - { - window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual"; - } -} -</script> +<script src="{{ URL_ROOT }}/static/exam/js/add_questionpaper.js"></script> {% endblock %} {% block manage %} +<input type=hidden id="url_root" value={{ URL_ROOT }}> <form> {% csrf_token %} Select mode to design Question Paper: @@ -50,5 +25,4 @@ Select mode to design Question Paper: </select> </form> - {% endblock %} |