N°3685 - Use WebResourcesHelper for D3/C3.js usages

This commit is contained in:
Molkobain
2021-09-13 17:44:04 +02:00
parent 74b7223d44
commit 754f755141
4 changed files with 46 additions and 13 deletions

View File

@@ -4,6 +4,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\Application\Helper\WebResourcesHelper;
use Combodo\iTop\Application\UI\Base\Component\Button\ButtonUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\DataTable\DataTableUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Input\Select\Select;
@@ -538,9 +539,7 @@ function DisplayRelatedClassesGraph($oPage, $sClass)
// 3) Processing data and building graph
//
// - Add graphs dependencies
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/c3.min.css');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/d3.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/c3.js');
WebResourcesHelper::EnableC3JSToWebPage($oPage);
// - Add markup
$oPage->add(
<<<EOF