converts rubrics/index js_block into js_bundle
test plan: * regression test rubrics Change-Id: I61810f5c2c00f3614008f19ca31d243cd483fca4 Reviewed-on: https://gerrit.instructure.com/29133 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jon Jensen <jon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
parent
1105b576b3
commit
b3e1fe0785
|
@ -0,0 +1,16 @@
|
|||
require [
|
||||
"i18n!rubrics.index",
|
||||
"jquery",
|
||||
"find_outcome",
|
||||
"jquery.instructure_misc_plugins"
|
||||
], (I18n, $) ->
|
||||
$(document).ready ->
|
||||
$("#rubrics ul .delete_rubric_link").click (event) ->
|
||||
event.preventDefault()
|
||||
$rubric = $(this).parents("li")
|
||||
$rubric.confirmDelete
|
||||
url: $(this).attr("href")
|
||||
message: I18n.t("are_you_sure_prompt", "Are you sure you want to delete this rubric? Any course currently associated with this rubric will still have access to it, but, no new courses will be able to use it.")
|
||||
success: ->
|
||||
$(this).slideUp ->
|
||||
$(this).remove()
|
|
@ -45,33 +45,7 @@
|
|||
}
|
||||
</style>
|
||||
<% end %>
|
||||
<% js_block do %>
|
||||
<script>
|
||||
require([
|
||||
'i18nObj' /* I18n.t */,
|
||||
'jquery' /* $ */,
|
||||
'find_outcome',
|
||||
'jquery.instructure_misc_plugins' /* confirmDelete */
|
||||
], function(I18n, $) {
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#rubrics ul .delete_rubric_link").click(function(event) {
|
||||
event.preventDefault();
|
||||
var $rubric = $(this).parents("li");
|
||||
$rubric.confirmDelete({
|
||||
url: $(this).attr('href'),
|
||||
message: <%= jt('are_you_sure_prompt', "Are you sure you want to delete this rubric? Any course currently associated with this rubric will still have access to it, but, no new courses will be able to use it.") %>,
|
||||
success: function() {
|
||||
$(this).slideUp(function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
<% js_bundle 'legacy/rubrics_index' %>
|
||||
<h2>
|
||||
<% case @context.class.to_s %>
|
||||
<% when 'Course' %>
|
||||
|
|
Loading…
Reference in New Issue