From a7c84a478789e9e835dcbb3ea41b1d519ba69b4d Mon Sep 17 00:00:00 2001 From: jayparikh111 Date: Tue, 13 Mar 2012 18:44:01 +0530 Subject: minor changes for UI --- testapp/exam/forms.py | 2 +- testapp/exam/views.py | 3 ++- testapp/static/exam/css/base.css | 5 ++-- testapp/static/exam/css/question_quiz.css | 6 +---- testapp/templates/exam/add_quiz.html | 14 +++++++++-- testapp/templates/exam/edit_question.html | 40 +++++++++++++++++++++++++++++-- testapp/templates/exam/edit_quiz.html | 21 ++++++++++++---- testapp/templates/exam/grade_user.html | 29 ++++++++++++---------- testapp/templates/exam/monitor.html | 18 +++++++++----- testapp/templates/exam/show_quiz.html | 5 ++-- testapp/templates/exam/user_data.html | 4 ++-- testapp/templates/manage.html | 31 +++++++++++++----------- 12 files changed, 122 insertions(+), 56 deletions(-) (limited to 'testapp') diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index e622b88..272a3d4 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -113,7 +113,7 @@ class QuizForm(forms.Form): start_date = forms.DateField(initial=datetime.date.today) duration = forms.IntegerField() active = forms.BooleanField(required = False) - description = forms.CharField(max_length=256, widget=forms.Textarea(attrs={'cols':20,'rows':2})) + description = forms.CharField(max_length=256, widget=forms.Textarea(attrs={'cols':20,'rows':1})) def save(self): start_date = self.cleaned_data["start_date"] diff --git a/testapp/exam/views.py b/testapp/exam/views.py index 2803538..ffb1b1e 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -246,7 +246,8 @@ def prof_manage(request): user = request.user if user.is_authenticated() and user.groups.filter(name='moderator').count() > 0: - return render_to_response('manage.html',{}) + context = {'user':user} + return render_to_response('manage.html',context) return my_redirect('/exam/login/') def user_login(request): diff --git a/testapp/static/exam/css/base.css b/testapp/static/exam/css/base.css index b7a9fbb..7099aab 100644 --- a/testapp/static/exam/css/base.css +++ b/testapp/static/exam/css/base.css @@ -1845,8 +1845,9 @@ footer { -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } -.page-header h1 { - margin-bottom: 8px; +.page-header h3 { + margin-top: 20px; + margin-bottom : -17px; } .btn.danger, .alert-message.danger, diff --git a/testapp/static/exam/css/question_quiz.css b/testapp/static/exam/css/question_quiz.css index 2e13364..643e5c6 100644 --- a/testapp/static/exam/css/question_quiz.css +++ b/testapp/static/exam/css/question_quiz.css @@ -2,8 +2,4 @@ table th, table td { text-align: left; } -textarea -{ -width : 300px; -height : 150px; -} + diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html index dedc627..fe99ce6 100644 --- a/testapp/templates/exam/add_quiz.html +++ b/testapp/templates/exam/add_quiz.html @@ -6,9 +6,18 @@ {% block css %} {% endblock %} +{% block script %} + +{% endblock %} +{% block onload %} onload="javascript:test();" {% endblock %} {% block manage %} -
{% endblock %} diff --git a/testapp/templates/exam/edit_question.html b/testapp/templates/exam/edit_question.html index a189ac5..b1395e9 100644 --- a/testapp/templates/exam/edit_question.html +++ b/testapp/templates/exam/edit_question.html @@ -15,15 +15,49 @@ function my_render(frm) } } +function load_form() +{ + +} + +function data(showContent,showHideDiv) +{ + var con = document.getElementById(showContent); + var ele=document.getElementById(showHideDiv); + if (ele.style.display=="block") + { + con.style.display = "none" + ele.style.display = "none"; + } + else + { + con.style.display = "block"; + ele.style.display = "block"; + } +} {% endblock %} +{% block onload %} onload='javascript:load_form();' {% endblock %} {% block manage %} + + {% endblock %} diff --git a/testapp/templates/exam/edit_quiz.html b/testapp/templates/exam/edit_quiz.html index 56eb0c0..d513e7a 100644 --- a/testapp/templates/exam/edit_quiz.html +++ b/testapp/templates/exam/edit_quiz.html @@ -5,19 +5,30 @@ {% block css %} + {% endblock %} {% block manage %}