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:
Landon Wilkins 2014-01-22 18:58:55 -07:00 committed by Landon Wilkins
parent 1105b576b3
commit b3e1fe0785
2 changed files with 17 additions and 27 deletions

View File

@ -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()

View File

@ -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' %>