diff --git a/js/dataTables.tree-grouping.js b/js/dataTables.tree-grouping.js new file mode 100644 index 000000000..bfb33aa02 --- /dev/null +++ b/js/dataTables.tree-grouping.js @@ -0,0 +1,359 @@ +/** + * External key grouping (tree display) for iTop DataTables. + * + * Activated when a DataTable has the 'sTreeGroupingAttr' option set (via DashletObjectList). + * Transforms a flat list of objects into an expandable/collapsible tree grouped by parent ID. + * + * @copyright Copyright (C) 2010-2024 Combodo SAS + * @license http://opensource.org/licenses/AGPL-3.0 + */ +var iTopDataTableExternalKeyGrouping = (function ($) { + 'use strict'; + + // Inject CSS once + var bCssInjected = false; + function _injectCss() { + if (bCssInjected) { + return; + } + bCssInjected = true; + $('