From b3e1fe07854149dbc0f60174d83ebe2f50b0464a Mon Sep 17 00:00:00 2001 From: Landon Wilkins Date: Wed, 22 Jan 2014 18:58:55 -0700 Subject: [PATCH] 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 Reviewed-by: Jon Jensen QA-Review: Caleb Guanzon Product-Review: Landon Wilkins --- .../bundles/legacy/rubrics_index.coffee | 16 +++++++++++ app/views/rubrics/index.html.erb | 28 +------------------ 2 files changed, 17 insertions(+), 27 deletions(-) create mode 100644 app/coffeescripts/bundles/legacy/rubrics_index.coffee diff --git a/app/coffeescripts/bundles/legacy/rubrics_index.coffee b/app/coffeescripts/bundles/legacy/rubrics_index.coffee new file mode 100644 index 00000000000..5ab4b01da9a --- /dev/null +++ b/app/coffeescripts/bundles/legacy/rubrics_index.coffee @@ -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() \ No newline at end of file diff --git a/app/views/rubrics/index.html.erb b/app/views/rubrics/index.html.erb index 0a1f3fd3600..387615b26f4 100644 --- a/app/views/rubrics/index.html.erb +++ b/app/views/rubrics/index.html.erb @@ -45,33 +45,7 @@ } <% end %> -<% js_block do %> - -<% end %> +<% js_bundle 'legacy/rubrics_index' %>

<% case @context.class.to_s %> <% when 'Course' %>