Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
8210f8c9
Commit
8210f8c9
authored
Apr 23, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spreadsheet widget: set height to allow loading very large spreadsheets
( in a quite ad-hoc way )
parent
5ee34a8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
dream/platform/src/handsontable/handsontable.js
dream/platform/src/handsontable/handsontable.js
+12
-0
No files found.
dream/platform/src/handsontable/handsontable.js
View file @
8210f8c9
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment