From 37f11d602dad9973ff0015ff3d6873f10d3b06b2 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Thu, 22 Aug 2013 14:53:56 +0200 Subject: [PATCH] OO-709: fix javascript error if the table of items isn't rendered --- src/main/java/org/olat/modules/qpool/ui/_content/items.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/olat/modules/qpool/ui/_content/items.html b/src/main/java/org/olat/modules/qpool/ui/_content/items.html index 137c5c23df8..3518c1e0a21 100644 --- a/src/main/java/org/olat/modules/qpool/ui/_content/items.html +++ b/src/main/java/org/olat/modules/qpool/ui/_content/items.html @@ -27,7 +27,8 @@ jQuery(function() { var footerHeight = jQuery('#b_footer').height() + jQuery('#qbuttons').height(); var maxHeight = winHeight - headerHeight - footerHeight - 50; ## padding arount table = relative position of table (space for search field) + height of action buttons below table + some extra space - var panePadding = jQuery('.dataTables_wrapper').position().top + jQuery('.o_qpool_button_bar_box').height() + 80; + var dataTablesPos = jQuery('.dataTables_wrapper').position() + var panePadding = (dataTablesPos ? dataTablesPos.top : 0) + jQuery('.o_qpool_button_bar_box').height() + 80; jQuery('#qpoolcontainer').width(width).height(maxHeight).layout({ north: { size: '50%' }, -- GitLab