Skip to content

Commit

Permalink
Include parent info when opening H5P editor (#3290)
Browse files Browse the repository at this point in the history
  • Loading branch information
marode-cap authored Aug 30, 2023
1 parent bdbaf27 commit ca463cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/scripts/topicEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,10 @@ class TopicH5P extends TopicBlock {
const x = window.top.outerWidth / 2 + window.top.screenX - (w / 2);
const y = window.top.outerHeight / 2 + window.top.screenY - (h / 2);

const { parentType, parentId } = this.props;

const editorPopup = window.open(
`/h5p/editor/${id ?? ''}?inline=1`,
`/h5p/editor/${id ?? ''}?parentType=${parentType}&parentId=${parentId}&inline=1`,
'h5p-editor',
`width=${w}, height=${h}, left=${x}, top=${y},
fullscreen=yes, toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=yes`,
Expand Down

0 comments on commit ca463cc

Please sign in to comment.