forked from h5p/moodle-mod_hvp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor.js
More file actions
28 lines (24 loc) · 721 Bytes
/
editor.js
File metadata and controls
28 lines (24 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(function ($) {
function getRow ($el) {
return $el.closest('.fitem');
}
function init () {
var $editor = $('.h5p-editor');
var $fileField = $('input[name="h5pfile"]');
if (H5PIntegration.hubIsEnabled) {
// TODO: This can easily break in new themes. Improve robustness of this
// by not including h5paction in form, when it should not be used.
$('input[name="h5paction"]').parents('.fitem').last().hide();
}
H5PEditor.init(
$('#mform1'),
$('input[name="h5paction"]'),
getRow($fileField),
getRow($editor),
$editor,
$('input[name="h5plibrary"]'),
$('input[name="h5pparams"]')
);
}
$(document).ready(init);
})(H5P.jQuery);