mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°3123 : Improved JavaScript management in web pages and ajax pages
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base;
|
||||
use Combodo\iTop\Application\UI\Base\UIException;
|
||||
|
||||
|
||||
/**
|
||||
@@ -29,6 +30,9 @@ namespace Combodo\iTop\Application\UI\Base;
|
||||
* @since 3.0.0
|
||||
*/
|
||||
interface iUIBlock {
|
||||
public const JS_TYPE_ON_INIT = "js";
|
||||
public const JS_TYPE_LIVE = "live.js";
|
||||
public const JS_TYPE_ON_READY = "ready.js";
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the global template (HTML, JS, CSS) to use or null if it's not provided. Should not be used to often as JS/CSS files would be duplicated making the browser parsing time way longer.
|
||||
*
|
||||
@@ -46,9 +50,11 @@ interface iUIBlock {
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the JS template to use or null if there is no inline JS to render
|
||||
*
|
||||
* @param string $sType javascript type only JS_TYPE_ON_INIT / JS_TYPE_ON_READY / JS_TYPE_LIVE
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function GetJsTemplateRelPath();
|
||||
public function GetJsTemplateRelPath(string $sType) ;
|
||||
|
||||
/**
|
||||
* Return an array of the relative paths (from <ITOP>/) of the JS files to use for the block itself
|
||||
|
||||
Reference in New Issue
Block a user