mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
UIBlock: Add external JS/CSS files (optional) inheritance
This way we ensure that a block always have the external resources from its ancestors as this will be necessary most of the time. From now on, the JS widget of the blocks will inherit from a common ancestor to factorize some mechanisms that are duplicates at many levels. This can be disabled in a particular block by overloading the INCLUDE_ANCESTORS_DEFAULT_XXX_FILES constants in which case, only the external files of the block itself will be included.
This commit is contained in:
@@ -23,6 +23,10 @@ class DataTable extends UIContentBlock
|
||||
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-datatable';
|
||||
// This block is handled by its own lib (dataTables)
|
||||
public const INCLUDE_ANCESTORS_DEFAULT_JS_FILES = false;
|
||||
public const INCLUDE_ANCESTORS_DEFAULT_CSS_FILES = false;
|
||||
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/datatable/layout';
|
||||
public const DEFAULT_JS_ON_READY_TEMPLATE_REL_PATH = 'base/components/datatable/layout';
|
||||
public const DEFAULT_JS_LIVE_TEMPLATE_REL_PATH = 'base/components/datatable/layout';
|
||||
|
||||
Reference in New Issue
Block a user