converts gradebooks/student_attendance js_block into js_bundle
test plan: * make an assignment * view the assignment (ex: /courses/1/assignments/97) * open up the console (script/console) * run the following commands * a = Assignment.last * a.submission_types = "attendance" * a.save * now refresh the assignment in the browser * verify that the assignment now shows an attendance assignment Change-Id: I81d904ad874bb4a854433bcc17d2d71aad871670 Reviewed-on: https://gerrit.instructure.com/29142 QA-Review: Landon Wilkins <lwilkins@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Simon Williams <simon@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com> Product-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
parent
e6a7ab373c
commit
9b090bb891
|
@ -0,0 +1,13 @@
|
|||
require [
|
||||
"jquery",
|
||||
"jquery.instructure_misc_helpers",
|
||||
"jquery.instructure_misc_plugins",
|
||||
"vendor/jquery.scrollTo"
|
||||
], ($) ->
|
||||
$(document).ready ->
|
||||
$(document).fragmentChange (event, hash) ->
|
||||
$("#student_attendance tr.highlighted").removeClass "highlighted"
|
||||
if hash.indexOf("#assignment_") is 0
|
||||
$tr = $("#" + hash.substring(1)).parents("tr")
|
||||
$tr.addClass "highlighted"
|
||||
$("html,body").scrollTo $tr
|
|
@ -55,26 +55,6 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% js_block do %>
|
||||
<script>
|
||||
require([
|
||||
'jquery' /* $ */,
|
||||
'jquery.instructure_misc_helpers' /* /\.detect/ */,
|
||||
'jquery.instructure_misc_plugins' /* fragmentChange */,
|
||||
'vendor/jquery.scrollTo' /* /\.scrollTo/ */
|
||||
], function($) {
|
||||
$(document).ready(function() {
|
||||
$(document).fragmentChange(function(event, hash) {
|
||||
$("#student_attendance tr.highlighted").removeClass('highlighted');
|
||||
if(hash.indexOf("#assignment_") == 0) {
|
||||
var $tr = $("#" + hash.substring(1)).parents("tr");
|
||||
$tr.addClass('highlighted');
|
||||
$("html,body").scrollTo($tr);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
<% js_bundle 'legacy/gradebooks_student_attendance' %>
|
||||
<% jammit_css :attendance %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue