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)
This commit is contained in:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user