Scroll to top in peer and staff grading, preserve line breaks in submissions

This commit is contained in:
Vik Paruchuri
2013-08-16 14:12:37 -04:00
parent be3291eeb0
commit 4f3ec68fb7
9 changed files with 43 additions and 22 deletions

View File

@@ -253,7 +253,7 @@ class @StaffGrading
# always clear out errors and messages on transition.
@error_msg = ''
@message = ''
if response.success
if response.problem_list
@problems = response.problem_list
@@ -265,6 +265,7 @@ class @StaffGrading
@error(response.error)
@render_view()
@scroll_to_top()
get_next_submission: (location) ->
@location = location
@@ -474,6 +475,11 @@ class @StaffGrading
new_text = "(Hide)"
@question_header.text(new_text)
scroll_to_top: () =>
$('html, body').animate({
scrollTop: $(".staff-grading").offset().top
}, 200)
# for now, just create an instance and load it...