mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
💄 iTop 3.0.0 badge dashlet : make whole badge clickable (#191)
Would be better to have only one handler on the dashboard side but we want to respect code responsibility ! So until we have a system for components to print "static" code (that will be printed only once whatever number of component instances we have in the page), we are doing it the "old" way : calling a JQuery widget in the component JS Twig.
This commit is contained in:
@@ -11,7 +11,11 @@ namespace Combodo\iTop\Application\UI\Base\Component\Dashlet;
|
||||
class DashletBadge extends DashletContainer
|
||||
{
|
||||
public const BLOCK_CODE = 'ibo-dashlet-badge';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/dashlet/dashletbadge';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/dashlet/dashlet-badge';
|
||||
public const DEFAULT_JS_TEMPLATE_REL_PATH = 'base/components/dashlet/dashlet-badge';
|
||||
public const DEFAULT_JS_FILES_REL_PATH = [
|
||||
'js/components/dashlet/dashlet-badge.js',
|
||||
];
|
||||
|
||||
/** @var string */
|
||||
protected $sClassIconUrl;
|
||||
|
||||
@@ -14,4 +14,11 @@ class DashletContainer extends UIContentBlock
|
||||
{
|
||||
public const BLOCK_CODE = 'ibo-dashlet';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/content-block/layout';
|
||||
|
||||
public function __construct(string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
parent::__construct($sId, $aContainerClasses);
|
||||
|
||||
$this->AddDataAttribute('role', static::BLOCK_CODE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user