mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°3685 - Front-end performances: Include graph lib. (D3/C3.js) only when necessary
This commit is contained in:
@@ -537,6 +537,11 @@ 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');
|
||||
// - Add markup
|
||||
$oPage->add(
|
||||
<<<EOF
|
||||
<div id="dataModelGraph">
|
||||
@@ -545,6 +550,7 @@ function DisplayRelatedClassesGraph($oPage, $sClass)
|
||||
</div>
|
||||
EOF
|
||||
);
|
||||
// - Add scripts
|
||||
$oPage->add_ready_script(
|
||||
<<<JS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user