Commit 8210f8c9 authored by Jérome Perrin's avatar Jérome Perrin

Spreadsheet widget: set height to allow loading very large spreadsheets

( in a quite ad-hoc way )
parent 5ee34a8b
......@@ -31,6 +31,18 @@
return this.getElement()
.push(function (element) {
gadget_element = element;
// XXX does not belong here. We need to have an height and width to the
// handsontable element so that it loads only what is displayed.
// XXX This is also very dirty because of assumptions for DREAM page layout (.nav_container and header)
// This is to prevent Error: Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.
function updateSize() {
$(element).find('.table-container').height(
($(window).height() - $(".nav_container").height() - $("header").height()));
}
$(window).resize(updateSize);
updateSize();
$(element).find('.table-container').handsontable("render");
})
.push(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment