Commit 9e4e98ef by Vik Paruchuri

Fix some css to get things to properly close/open

parent 02ac72d0
...@@ -179,6 +179,9 @@ class @PeerGradingProblem ...@@ -179,6 +179,9 @@ class @PeerGradingProblem
@grading_panel = $('.grading-panel') @grading_panel = $('.grading-panel')
@content_panel = $('.content-panel') @content_panel = $('.content-panel')
@grading_message = $('.grading-message') @grading_message = $('.grading-message')
@question_header = $('.question-header')
@question_header
@question_header.click @collapse_question
@grading_message.hide() @grading_message.hide()
@grading_wrapper =$('.grading-wrapper') @grading_wrapper =$('.grading-wrapper')
...@@ -280,6 +283,7 @@ class @PeerGradingProblem ...@@ -280,6 +283,7 @@ class @PeerGradingProblem
if response.calibrated and (@calibration == null or @calibration == false) if response.calibrated and (@calibration == null or @calibration == false)
@calibration = false @calibration = false
@fetch_submission_essay() @fetch_submission_essay()
@collapse_question()
# If we were calibrating before and no longer need to, # If we were calibrating before and no longer need to,
# show the interstitial page # show the interstitial page
else if response.calibrated and @calibration == true else if response.calibrated and @calibration == true
...@@ -469,6 +473,15 @@ class @PeerGradingProblem ...@@ -469,6 +473,15 @@ class @PeerGradingProblem
$("input[name='score-selection']").change @graded_callback $("input[name='score-selection']").change @graded_callback
$("input[name='grade-selection']").change @graded_callback $("input[name='grade-selection']").change @graded_callback
collapse_question: () =>
@prompt_container.slideToggle()
@prompt_container.toggleClass('open')
if @question_header.text() == "(Hide)"
new_text = "(Show)"
else
new_text = "(Hide)"
@question_header.text(new_text)
#mock_backend = false #mock_backend = false
#ajax_url = $('.peer-grading').data('ajax_url') #ajax_url = $('.peer-grading').data('ajax_url')
#backend = new PeerGradingProblemBackend(ajax_url, mock_backend) #backend = new PeerGradingProblemBackend(ajax_url, mock_backend)
......
...@@ -9,6 +9,12 @@ div.peer-grading{ ...@@ -9,6 +9,12 @@ div.peer-grading{
margin : 0 0 0 10px; margin : 0 0 0 10px;
} }
h2{
a{
text-size: .5em;
}
}
div { div {
margin: 0px; margin: 0px;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="prompt-wrapper"> <div class="prompt-wrapper">
<h2>Question</h2> <h2>Question <a href="#" class="question-header">(Hide)</a> </h2>
<div class="prompt-information-container"> <div class="prompt-information-container">
<section> <section>
<div class="prompt-container"> <div class="prompt-container">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment