Plugin: H5P: Add check to avoid double-loading jquery-ui.min.js - refs #4689

pull/4737/head
Yannick Warnier 2 years ago
parent 633277b678
commit 0ab027d377
  1. 2
      plugin/h5p/index.php

@ -19,7 +19,7 @@ if ($posCtr === false) {
$webPath = api_get_path(WEB_PATH);
if ($ctrAction == 'edit_item' || $ctrAction == 'add_item') {
$fh .= '<script src="'.$pluginPath.'h5p/resources/js/h5p_extras.js'.$version.'" type="text/javascript" ></script>';
$fh .= '<script type="text/javascript" src="'.$webPath.'web/assets/jquery-ui/jquery-ui.min.js"></script>';
$fh .= '<script>if (!jQuery.ui) {'."$('body').append('<script src=\"".$webPath."web/assets/jquery-ui/jquery-ui.min.js\"></script>');}</script>";
$fh .= '<link rel="stylesheet" type="text/css" href="'.$webPath.'web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css">';
$fh .= '<link rel="stylesheet" type="text/css" href="'.$pluginPath.'h5p/resources/css/window-h5p.css">';
}

Loading…
Cancel
Save