N°4662 - Add comment to all concerned templates

This commit is contained in:
Molkobain
2022-02-17 14:13:41 +01:00
parent f1cce8e430
commit 7207dc657c
2 changed files with 37 additions and 35 deletions

View File

@@ -205,26 +205,27 @@
if( (item.description !== undefined) && (item.description !== '') )
{
iItemFlags += 2;
textWrapperElem.append( $('<div></div>').addClass('mosaic-item-description').html(item.description) );
}
aElem.append( textElem );
// - Adding CSS class to adjust the layout regarding which properties are available
aElem.addClass('mosaic-item-layout-'+iItemFlags);
textWrapperElem.append($('<div></div>').addClass('mosaic-item-description').html(item.description));
}
aElem.append(textElem);
// - Adding CSS class to adjust the layout regarding which properties are available
aElem.addClass('mosaic-item-layout-'+iItemFlags);
// - Appending element
$('div[data-level-id="'+nodeId+'"]').append(itemElem);
itemElem.append(aElem);
// Building tooltip for the node
if( (item.tooltip !== undefined) && ($('<div>'+item.tooltip+'</div>').text() !== '') )
{
$('div[data-level-id="'+nodeId+'"]').append(itemElem);
itemElem.append(aElem);
// Building tooltip for the node
// N°4662 - Surround tooltip with div to ensure text retrival
if ((item.tooltip !== undefined) && ($('<div>'+item.tooltip+'</div>').text() !== ''))
{
aElem.attr('data-tooltip-content', item.tooltip).attr('data-tooltip-html-enabled', true);
CombodoTooltip.InitTooltipFromMarkup(aElem);
}
// Building actions for that node
switch(levelPrimaryAction.type)
{
case '{{ constant('Combodo\\iTop\\Portal\\Brick\\BrowseBrick::ENUM_ACTION_DRILLDOWN') }}':
}
// Building actions for that node
switch (levelPrimaryAction.type)
{
case '{{ constant('Combodo\\iTop\\Portal\\Brick\\BrowseBrick::ENUM_ACTION_DRILLDOWN') }}':
aElem.addClass('mosaic-drilldown');
break;
case '{{ constant('Combodo\\iTop\\Portal\\Brick\\BrowseBrick::ENUM_ACTION_VIEW') }}':

View File

@@ -195,25 +195,26 @@
var levelPrimaryAction = levelActions[levelActionsKeys[0]];
var url = '';
var liElem = $('<li></li>').addClass('list-group-item');
var aElem = $('<span></span>').addClass('tree-item-wrapper').attr('data-item-id', item.id).attr('data-level-alias', item.level_alias);
var nameElem = $('<a></a>').addClass('tree-item').text(item.name);
// Building node
$('ul[data-level-id="'+nodeId+'"]').append(liElem);
aElem.append(nameElem);
liElem.append(aElem);
// Building tooltip for the node
if( (item.tooltip !== undefined) && ($('<div>'+item.tooltip+'</div>').text() !== '') )
{
nameElem.attr('data-tooltip-content', item.tooltip).attr('data-tooltip-html-enabled', true);
var liElem = $('<li></li>').addClass('list-group-item');
var aElem = $('<span></span>').addClass('tree-item-wrapper').attr('data-item-id', item.id).attr('data-level-alias', item.level_alias);
var nameElem = $('<a></a>').addClass('tree-item').text(item.name);
// Building node
$('ul[data-level-id="'+nodeId+'"]').append(liElem);
aElem.append(nameElem);
liElem.append(aElem);
// Building tooltip for the node
// N°4662 - Surround tooltip with div to ensure text retrival
if ((item.tooltip !== undefined) && ($('<div>'+item.tooltip+'</div>').text() !== ''))
{
nameElem.attr('data-tooltip-content', item.tooltip).attr('data-tooltip-html-enabled', true);
CombodoTooltip.InitTooltipFromMarkup(nameElem);
}
// Building description for the node
if( (item.description !== undefined) && (item.description !== '') )
{
aElem.append( $('<span class="list-group-item-description">'+item.description+'</span>') );
}
}
// Building description for the node
if ((item.description !== undefined) && (item.description !== ''))
{
aElem.append($('<span class="list-group-item-description">'+item.description+'</span>'));
}
// Building actions for that node
switch(levelPrimaryAction.type)