Commit dbbbe8f2 by Braden MacDonald

Fix: inadvertent scroll when loading the instructor's extensions tab

(The div with id "view-extensions" conflicts with the tab JS which sets location.hash to "view-x" in order to track the current tab)
parent 92fa79db
......@@ -70,7 +70,7 @@ class Extensions
@clear_display()
@$grid_table.text 'Loading...'
@$url_input = @$section.find("#view-extensions select[name='url']")
@$url_input = @$section.find("#view-granted-extensions select[name='url']")
url = @$show_unit_extensions.data 'endpoint'
send_data =
url: @$url_input.val()
......@@ -78,7 +78,7 @@ class Extensions
dataType: 'json'
url: url
data: send_data
error: (xhr) => @fail_with_error "view-extensions", "Error getting due dates", xhr
error: (xhr) => @fail_with_error "view-granted-extensions", "Error getting due dates", xhr
success: (data) => @display_grid data
@$show_student_extensions.click =>
......@@ -86,14 +86,14 @@ class Extensions
@$grid_table.text 'Loading...'
url = @$show_student_extensions.data 'endpoint'
@$student_input = @$section.find("#view-extensions input[name='student']")
@$student_input = @$section.find("#view-granted-extensions input[name='student']")
send_data =
student: @$student_input.val()
$.ajax
dataType: 'json'
url: url
data: send_data
error: (xhr) => @fail_with_error "view-extensions", "Error getting due dates", xhr
error: (xhr) => @fail_with_error "view-granted-extensions", "Error getting due dates", xhr
success: (data) => @display_grid data
# handler for when the section title is clicked.
......
......@@ -39,7 +39,7 @@
</p>
</div>
<hr/>
<div id="view-extensions">
<div id="view-granted-extensions">
<h2>${_("Viewing granted extensions")}</h2>
<p>
${_("Here you can see what extensions have been granted on particular "
......
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