1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Removed filesaver

This commit is contained in:
2015-12-08 13:04:55 +00:00
parent 9ef5ac2197
commit 13e574207c
2 changed files with 0 additions and 17 deletions

View File

@@ -12,7 +12,5 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.map"></script>
<!-- File saver does more than excel exports but that is currently what we are using it for -->
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>
<style>
</style>

View File

@@ -3,25 +3,10 @@
#html, #body, #wrapper { width:100%; }
</style>
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>
<script>
function exportDataToRtf() {
var blob = new Blob([document.getElementById("exportable").innerHTML], {
type: "application/octet-stream"
});
saveAs(blob, "brackets.rtf");
}
</script>
<%= link_to "Back to #{@tournament.name} weights", "/tournaments/#{@tournament.id}/brackets" %>
<br>
<br>
<button type="submit" class="btn btn-primary" onclick="exportDataToRtf()">Export to file for printing</button>
<!--[if lte IE 9]>
<div>Excel export does not work on IE versions lower than 10. Please use chrome or update IE.</div>
<!--<![endif]-->
<br>
<br>
<div id="exportable">
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %>
<div class="pagebreak">