converts user_outcome_results js_block into js_bundle

test plan:
* regression test user outcome results

Change-Id: Ie69085636afaa4f582ddacb81ca970ae42928a31
Reviewed-on: https://gerrit.instructure.com/29140
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 20:25:23 -07:00 committed by Landon Wilkins
parent 76d0f96978
commit efceb76996
2 changed files with 14 additions and 21 deletions

View File

@ -0,0 +1,13 @@
require [
"jquery",
"i18n!outcomes.user_outcome_results"
], ($, I18n) ->
$(document).ready ->
showAllArtifacts = $("#show_all_artifacts_link")
showAllArtifacts.click (event) ->
event.preventDefault()
$("tr.artifact_details").toggle()
if showAllArtifacts.html() is I18n.t("#buttons.show_all_artifacts", "Show All Artifacts")
showAllArtifacts.html I18n("#buttons.hide_all_artifacts", "Hide All Artifacts")
else
showAllArtifacts.html I18n.t("#buttons.show_all_artifacts", "Show All Artifacts")

View File

@ -60,27 +60,7 @@
}
</style>
<% end %>
<% js_block do %>
<script>
require([
'jquery' /* $ */
], function($) {
$(document).ready(function() {
var showAllArtifacts = $("#show_all_artifacts_link");
showAllArtifacts.click(function(event) {
event.preventDefault();
$("tr.artifact_details").toggle();
if (showAllArtifacts.html() === '<%= t "#buttons.show_all_artifacts", "Show All Artifacts" %>') {
showAllArtifacts.html('<%= t "#buttons.hide_all_artifacts", "Hide All Artifacts" %>');
} else {
showAllArtifacts.html('<%= t "#buttons.show_all_artifacts", "Show All Artifacts" %>');
}
});
});
});
</script>
<% end %>
<% js_bundle 'legacy/user_outcome_results' %>
<table id="outcomes">
<thead>