mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38: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:
@@ -137,7 +137,7 @@ interface iUIBlock {
|
||||
public function GetParameters(): array;
|
||||
|
||||
/**
|
||||
* Add a JS file to a block
|
||||
* Add a JS file to a block (if not already present)
|
||||
*
|
||||
* @param string $sPath relative path of a JS file to add
|
||||
*
|
||||
@@ -146,7 +146,17 @@ interface iUIBlock {
|
||||
public function AddJsFileRelPath(string $sPath);
|
||||
|
||||
/**
|
||||
* Add a CSS file to a block
|
||||
* Add several JS files to a block.
|
||||
* Duplicates will not be added.
|
||||
*
|
||||
* @param string[] $aPaths
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function AddMultipleJsFilesRelPaths(array $aPaths);
|
||||
|
||||
/**
|
||||
* Add a CSS file to a block (if not already present)
|
||||
*
|
||||
* @param string $sPath relative path of a CSS file to add
|
||||
*
|
||||
@@ -154,4 +164,14 @@ interface iUIBlock {
|
||||
*/
|
||||
public function AddCssFileRelPath(string $sPath);
|
||||
|
||||
/**
|
||||
* Add several CSS files to a block.
|
||||
* Duplicates will not be added.
|
||||
*
|
||||
* @param string[] $aPaths
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function AddMultipleCssFilesRelPaths(array $aPaths);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user