mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-08 13:31:24 +00:00
use new method $category->getColor()
This commit is contained in:
parent
80ad81a1e2
commit
b129d2d5ad
|
|
@ -3499,7 +3499,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category) {
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".htmlspecialchars($category->getName())."</span> ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3554,7 +3554,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
if($categories = $document->getCategories()) {
|
||||
$content .= "<br />";
|
||||
foreach($categories as $category) {
|
||||
$color = substr(md5($category->getName()), 0, 6);
|
||||
$color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6);
|
||||
$content .= "<span class=\"badge\" style=\"background-color: #".$color."; color: #".self::getContrastColor($color).";\">".htmlspecialchars($category->getName())."</span> ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user