2018-12-12 18:15:16 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<style type="text/css">
|
2018-12-19 04:03:10 +08:00
|
|
|
<%= Rails.application
|
|
|
|
.assets_manifest
|
|
|
|
.find_sources('application.css')
|
|
|
|
.first
|
|
|
|
.to_s
|
|
|
|
.force_encoding(Encoding::UTF_8)
|
|
|
|
.html_safe %>
|
2018-12-12 18:15:16 +08:00
|
|
|
</style>
|
2019-01-31 14:39:17 +08:00
|
|
|
|
|
|
|
<script src="handsontable.full.min.js"></script>
|
|
|
|
|
|
|
|
<!-- Libraries for formulas -->
|
|
|
|
<script src="lodash.js"></script>
|
|
|
|
<script src="numeral.js"></script>
|
|
|
|
<script src="numeric.js"></script>
|
|
|
|
<script src="md5.js"></script>
|
|
|
|
<script src="jstat.js"></script>
|
|
|
|
<script src="formula.js"></script>
|
|
|
|
<script src="parser.js"></script>
|
|
|
|
<script src="ruleJS.js"></script>
|
|
|
|
<script src="handsontable.formula.js"></script>
|
|
|
|
<script src="big.min.js"></script>
|
|
|
|
|
|
|
|
<!-- Init Handsontables -->
|
|
|
|
<script>
|
|
|
|
window.onload = function() {
|
|
|
|
var tables = document.getElementsByClassName('hot-table-container');
|
|
|
|
var tableVals = document.getElementsByClassName('hot-table-contents');
|
|
|
|
|
|
|
|
for (i = 0; i < tables.length; i++) {
|
|
|
|
tables[i].innerHTML=''
|
|
|
|
new Handsontable(tables[i], {
|
|
|
|
data: JSON.parse(tableVals[i].value).data,
|
|
|
|
rowHeaders: true,
|
|
|
|
colHeaders: true,
|
|
|
|
filters: true,
|
|
|
|
dropdownMenu: true,
|
|
|
|
formulas: true
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2018-12-12 18:15:16 +08:00
|
|
|
<title><%= title %></title>
|
|
|
|
</head>
|
|
|
|
<body class='print-report-body'>
|
|
|
|
<div class='print-report'>
|
2018-12-19 04:03:10 +08:00
|
|
|
<%= content.force_encoding(Encoding::UTF_8).html_safe %>
|
2018-12-12 18:15:16 +08:00
|
|
|
</div>
|
|
|
|
</body>
|
2019-01-31 14:39:17 +08:00
|
|
|
</html>
|