From 10859e46c1f8878604875a74e1b891c51f828161 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 4 Jun 2024 15:12:52 +0200 Subject: [PATCH 1/2] Make iframe methods available on submissions page --- app/javascript/packs/submission.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/packs/submission.js b/app/javascript/packs/submission.js index 1ecb5eaf22..c45ab5b66a 100644 --- a/app/javascript/packs/submission.js +++ b/app/javascript/packs/submission.js @@ -1,5 +1,5 @@ import { initSubmissionShow, initCorrectSubmissionToNextLink, initSubmissionHistory, showLastTab } from "submission.ts"; -import { initMathJax } from "exercise.ts"; +import { initMathJax, onFrameMessage, onFrameScroll } from "exercise.ts"; import { attachClipboard } from "copy"; import { evaluationState } from "state/Evaluations"; import codeListing from "code_listing"; @@ -19,5 +19,8 @@ window.dodona.showLastTab = showLastTab; window.dodona.initTutor = initTutor; window.dodona.initFileViewers = initFileViewers; +window.dodona.afterResize = () => {}; +window.dodona.onFrameMessage = onFrameMessage; +window.dodona.onFrameScroll = onFrameScroll; // will automatically bind to window.iFrameResize() require("iframe-resizer"); // eslint-disable-line no-undef From 273c817e2fdd8340fb4a84af5bbd01e502753b64 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Wed, 5 Jun 2024 10:05:28 +0200 Subject: [PATCH 2/2] Fix series overview page --- app/javascript/packs/series_overview.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/packs/series_overview.js b/app/javascript/packs/series_overview.js index 12a735d2b9..ee47cc07e4 100644 --- a/app/javascript/packs/series_overview.js +++ b/app/javascript/packs/series_overview.js @@ -1,8 +1,11 @@ -import { initExerciseDescription } from "exercise.ts"; +import { initExerciseDescription, afterResize, onFrameMessage, onFrameScroll } from "exercise.ts"; import { initSeriesShow } from "series"; window.dodona.initExerciseDescription = initExerciseDescription; window.dodona.initSeriesShow = initSeriesShow; +window.dodona.afterResize = afterResize; +window.dodona.onFrameMessage = onFrameMessage; +window.dodona.onFrameScroll = onFrameScroll; // will automatically bind do window.iFrameResize() require("iframe-resizer"); // eslint-disable-line no-undef