mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +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:
@@ -1,12 +1,13 @@
|
||||
{# @copyright Copyright (C) 2010-2020 Combodo SARL #}
|
||||
{# @license http://opensource.org/licenses/AGPL-3.0 #}
|
||||
{% apply spaceless %}
|
||||
<div class="ibo-dashlet-badge--body{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" id="{{ oUIBlock.GetId() }}">
|
||||
<div class="ibo-dashlet-badge--body{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" id="{{ oUIBlock.GetId() }}"
|
||||
data-role="ibo-dashlet-badge--body">
|
||||
<div class="ibo-dashlet-badge--icon-container">
|
||||
<img class="ibo-dashlet-badge--icon" src="{{ oUIBlock.GetClassIconUrl() }}">
|
||||
</div>
|
||||
<div class="ibo-dashlet-badge--actions">
|
||||
<a class="ibo-dashlet-badge--action-list" href="{{ oUIBlock.GetHyperlink() }}">
|
||||
<a class="ibo-dashlet-badge--action-list" href="{{ oUIBlock.GetHyperlink() }}" data-role="ibo-dashlet-badge--action-list">
|
||||
<span class="ibo-dashlet-badge--action-list-count">{{ oUIBlock.GetCount() }}</span>
|
||||
<span class="ibo-dashlet-badge--action-list-label">{{ oUIBlock.GetClassLabel() }}</span>
|
||||
</a>
|
||||
1
templates/base/components/dashlet/dashlet-badge.js.twig
Normal file
1
templates/base/components/dashlet/dashlet-badge.js.twig
Normal file
@@ -0,0 +1 @@
|
||||
$('#{{ oUIBlock.GetId() }}').dashlet_badge();
|
||||
Reference in New Issue
Block a user