mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
1b34de37ef
CSP and inline js refactor [SCI-8118][SCI-8119]
17 lines
491 B
JavaScript
17 lines
491 B
JavaScript
/* global Handsontable */
|
|
window.onload = function() {
|
|
var tables = document.getElementsByClassName('hot-table-container');
|
|
var tableVals = document.getElementsByClassName('hot-table-contents');
|
|
|
|
for (let i = 0; i < tables.length; i += 1) {
|
|
tables[i].innerHTML = '';
|
|
new Handsontable(tables[i], {
|
|
data: JSON.parse(tableVals[i].value).data,
|
|
rowHeaders: true,
|
|
colHeaders: true,
|
|
filters: true,
|
|
dropdownMenu: true,
|
|
formulas: true
|
|
});
|
|
}
|
|
};
|