Fix some css to get things to properly close/open
This commit is contained in:
@@ -179,6 +179,9 @@ class @PeerGradingProblem
|
||||
@grading_panel = $('.grading-panel')
|
||||
@content_panel = $('.content-panel')
|
||||
@grading_message = $('.grading-message')
|
||||
@question_header = $('.question-header')
|
||||
@question_header
|
||||
@question_header.click @collapse_question
|
||||
@grading_message.hide()
|
||||
|
||||
@grading_wrapper =$('.grading-wrapper')
|
||||
@@ -280,6 +283,7 @@ class @PeerGradingProblem
|
||||
if response.calibrated and (@calibration == null or @calibration == false)
|
||||
@calibration = false
|
||||
@fetch_submission_essay()
|
||||
@collapse_question()
|
||||
# If we were calibrating before and no longer need to,
|
||||
# show the interstitial page
|
||||
else if response.calibrated and @calibration == true
|
||||
@@ -469,6 +473,15 @@ class @PeerGradingProblem
|
||||
$("input[name='score-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
|
||||
#ajax_url = $('.peer-grading').data('ajax_url')
|
||||
#backend = new PeerGradingProblemBackend(ajax_url, mock_backend)
|
||||
|
||||
@@ -9,6 +9,12 @@ div.peer-grading{
|
||||
margin : 0 0 0 10px;
|
||||
}
|
||||
|
||||
h2{
|
||||
a{
|
||||
text-size: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<div class="prompt-wrapper">
|
||||
<h2>Question</h2>
|
||||
<h2>Question <a href="#" class="question-header">(Hide)</a> </h2>
|
||||
<div class="prompt-information-container">
|
||||
<section>
|
||||
<div class="prompt-container">
|
||||
@@ -21,7 +21,7 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="grading-wrapper">
|
||||
|
||||
Reference in New Issue
Block a user