| Server IP : 77.37.83.134 / Your IP :
216.73.216.24 [
Web Server : LiteSpeed System : Linux nl-srv-web1124.main-hosting.eu 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64 User : u964240598 ( 964240598) PHP Version : 8.4.19 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u964240598/public_html/wp-content/plugins/h5p/admin/scripts/ |
Upload File : |
/* globals H5PDataView send_to_editor tb_remove tb_show */
// Create content results data view
var H5PDataViewInstances = [];
(function ($) {
/**
* @private
*/
var createDataView = function (dataView, wrapper, loaded) {
return new H5PDataView(
wrapper,
dataView.source,
dataView.headers,
dataView.l10n,
{
table: 'wp-list-table widefat fixed'
},
dataView.filters,
loaded,
dataView.order
);
};
/**
* @private
*/
var insertionDataView = function (id) {
var $wrapper;
var $add = $(document).on('click', '#add-h5p', function () {
// Open ThickBox
tb_show($(this).attr('title'), '#TB_inline?inlineId=h5p-nope');
$('#TB_window').addClass('h5p-insertion');
if ($wrapper === undefined) {
// Create new data view
$wrapper = $('<div id="h5p-insert-content"/>').appendTo('#TB_ajaxContent');
var reportUrl = H5PIntegration.dataViews[id].source.replace('h5p_insert_content', 'h5p_inserted');
H5PDataViewInstances[id] = createDataView(H5PIntegration.dataViews[id], $wrapper.get(0), function () {
// Data loaded
$wrapper.find('.h5p-insert').click(function () {
// Inserting content
var contentId = $(this).data('id');
if ($add.data('method') === 'slug') {
send_to_editor('[h5p slug="' + $(this).data('slug') + '"]');
}
else {
send_to_editor('[h5p id="' + contentId + '"]');
}
$wrapper.detach();
$('#TB_window').removeClass('h5p-insertion');
tb_remove();
$.post(reportUrl, {id: contentId});
});
});
}
else {
// Append existing data view
$wrapper.appendTo('#TB_ajaxContent');
}
return false;
});
};
$(document).ready(function () {
for (var id in H5PIntegration.dataViews) {
if (!H5PIntegration.dataViews.hasOwnProperty(id)) {
continue;
}
if (id === 'h5p-insert-content') {
insertionDataView(id);
continue;
}
var wrapper = $('#' + id).get(0);
if (wrapper !== undefined) {
H5PDataViewInstances[id] = createDataView(H5PIntegration.dataViews[id], wrapper);
}
}
});
})(H5P.jQuery);
Anon7 - 2022
AnonSec Team
