set background color of category tag

This commit is contained in:
Uwe Steinmann 2021-07-12 18:32:47 +02:00
parent b04b344507
commit 0094095ede
2 changed files with 2 additions and 2 deletions

View File

@ -3094,7 +3094,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($categories = $document->getCategories()) {
$content .= "<br />";
foreach($categories as $category)
$content .= "<span class=\"badge bg-secondary\">".$category->getName()."</span> ";
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: '.$category->getColor().' !important;"' : '').">".$category->getName()."</span> ";
}
if(!empty($extracontent['bottom_title']))
$content .= $extracontent['bottom_title'];

View File

@ -3039,7 +3039,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($categories = $document->getCategories()) {
$content .= "<br />";
foreach($categories as $category)
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: #'.$category->getColor().' !important;"' : '').">".$category->getName()."</span> ";
$content .= "<span class=\"badge bg-secondary\"".($category->getColor() ? ' style="background-color: '.$category->getColor().' !important;"' : '').">".$category->getName()."</span> ";
}
if(!empty($extracontent['bottom_title']))
$content .= $extracontent['bottom_title'];