Add collapse action into staff grading view

This commit is contained in:
Vik Paruchuri
2013-02-07 12:42:05 -05:00
parent 3457b86bd0
commit baba8d3a36
3 changed files with 16 additions and 4 deletions

View File

@@ -181,7 +181,6 @@ class @PeerGradingProblem
@grading_message = $('.grading-message')
@grading_message.hide()
@question_header = $('.question-header')
@question_header
@question_header.click @collapse_question
@grading_wrapper =$('.grading-wrapper')
@@ -445,4 +444,4 @@ class @PeerGradingProblem
new_text = "(Show)"
else
new_text = "(Hide)"
@question_header.text(new_text)
@question_header.text(new_text)

View File

@@ -180,6 +180,9 @@ class @StaffGrading
@ml_error_info_container = $('.ml-error-info-container')
@breadcrumbs = $('.breadcrumbs')
@question_header = $('.question-header')
@question_header.click @collapse_question
# model state
@state = state_no_data
@@ -428,7 +431,17 @@ class @StaffGrading
@get_next_submission(@location)
else
@error('System got into invalid state for submission: ' + @state)
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)
# for now, just create an instance and load it...
mock_backend = false

View File

@@ -50,7 +50,7 @@
</div>
</div>
<div class="prompt-information-container">
<h3>Question</h3>
<h3>Question <a href="#" class="question-header">(Hide)</a> </h3>
<div class="prompt-container">
</div>
</div>