Index: lams_tool_doku/web/pages/monitoring/summary.jsp =================================================================== diff -u -r4c0912a762a22ff88d299f687550529fa5d6d480 -r0e1bde076043c513d801d83ff6586c6be146c6f5 --- lams_tool_doku/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 4c0912a762a22ff88d299f687550529fa5d6d480) +++ lams_tool_doku/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 0e1bde076043c513d801d83ff6586c6be146c6f5) @@ -70,6 +70,19 @@ var isCountdownStarted = ${not empty dokumaran.timeLimitLaunchedDate}; $(document).ready(function(){ + // Resize Etherpad iframe when its content grows. + // It does not support shrinking, only growing. + // This feature requires ep_resize plugin installed in Etherpad and customised with code in Doku tool + $(window).on('message onmessage', function (e) { + var msg = e.originalEvent.data; + if (msg.name === 'ep_resize') { + var src = msg.data.location.substring(0, msg.data.location.indexOf('?')), + iframe = $('iframe[src^="' + src + '"]'), + // height should be no less than 200 px + height = Math.max(200, msg.data.height); + iframe.height(height); + } + }); $('#etherpad-container-${groupSummary.sessionId}').pad({ @@ -333,11 +346,6 @@ $('#countdown').countdown('pause'); } } - - function showTimeSlider(toolSessionId, padId) { - $('#etherpad-container-' + toolSessionId).html("