mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-70806-master' of git://github.com/ferranrecio/moodle
This commit is contained in:
commit
260c6f3097
@ -87,6 +87,9 @@ if (empty($messages->error) && empty($messages->exception)) {
|
||||
$PAGE->add_body_class('h5p-embed');
|
||||
$PAGE->set_pagelayout('embedded');
|
||||
|
||||
// Load the embed.js to allow communication with the parent window.
|
||||
$PAGE->requires->js(new moodle_url('/h5p/js/embed.js'));
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Print all the errors.
|
||||
|
@ -35,10 +35,3 @@
|
||||
allowfullscreen="allowfullscreen" class="h5p-player w-100 border-0"
|
||||
style="height: 0px;" id="{{uniqid}}-h5player">
|
||||
</iframe>
|
||||
{{#js}}
|
||||
window.onload=function(){
|
||||
setTimeout(() => {
|
||||
document.getElementById('{{uniqid}}-h5player').style.minHeight = '230px';
|
||||
}, 1000);
|
||||
};
|
||||
{{/js}}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
This template will render the embed code shown in the H5P content embed popup.
|
||||
|
||||
Note: this mustache is part of the H5P player and requires '/h5p/js/embed.js' already loaded.
|
||||
|
||||
Variables required for this template:
|
||||
* h5picon - The icon
|
||||
* message - The error messages to display.
|
||||
@ -55,4 +57,11 @@
|
||||
</div>
|
||||
{{/error}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#js}}
|
||||
(function() {
|
||||
H5PEmbedCommunicator.send('resize', {
|
||||
scrollHeight: document.body.scrollHeight
|
||||
});
|
||||
})();
|
||||
{{/js}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user