<br>Добрый день!</br>
Подскажите, можно ли в новой версии Mantis (2.18.0) в списке багов выделять цветом всю строку с багом, как это было в более ранних версиях. Или как-то сделать более наглядную цветовую индикацию?
Разукрасить список багов
Moderators: Developer, Contributor
Re: Разукрасить список багов
Можете привести пример (скриншот), о чем вы говорите?
Re: Разукрасить список багов
Как было раньше - MantisBT_old.png (цветом выделена вся строка)
Как стало - MantisBT_new.png (цветом выделен только столбец Статус)
Как стало - MantisBT_new.png (цветом выделен только столбец Статус)
- Attachments
-
- MantisBT_old.png (148.09 KiB) Viewed 9660 times
-
- MantisBT_new.png (137.13 KiB) Viewed 9660 times
Re: Разукрасить список багов
Без изменения кода ядра мантиса не получится.
Re: Разукрасить список багов
У меня получилось по этому совету:
viewtopic.php?f=4&t=25073
Там ставится плагин CustomContent и небольшой js
viewtopic.php?f=4&t=25073
Там ставится плагин CustomContent и небольшой js
Re: Разукрасить список багов
Резюмирую все настройки, может кому-то ещё пригодятся.
- Скачиваем CustomContent Plugin и копируем его в mantis/plugins
- Добавляем в файл mantis/config/config_inc.php настройки для CustomContent Plugin:
Code: Select all
# CustomContent Plugin settings
# ------------------------------------------------------
# this file will be included right after the opening <body> tag
$g_custom_body_begin_file = "%absolute_path%/plugins/CustomContent/inc/custom_body_begin_file.php";
# this file will be included at the end of the header layout section, i.e. the main menu
$g_custom_page_header = "%absolute_path%/plugins/CustomContent/inc/custom_page_header_file.php";
# this file will be included at the end of the footer layout section, i.e the Mantis copyright
$g_custom_page_footer = "%absolute_path%/plugins/CustomContent/inc/custom_page_footer_file.php";
# this file will be included right before the closing <body> tag
$g_custom_body_end_file = "%absolute_path%/plugins/CustomContent/inc/custom_body_end_file.php";
- В mantis/js создаём файл custom.js с содержимым:
Code: Select all
$(function() {
$(".fa-status-box").each(function() {
var $this = $(this);
var col = $this.css('color');
var a = col.slice(4).split(',');
var newAlpha = 0.3;
var bgCol = 'rgba('+a[0]+','+parseInt(a[1])+','+parseInt(a[2])+','+newAlpha+')';
$this.closest("tr").css("background-color", bgCol);
});
});
- В конец файла mantis/plugins/CustomContent/inc/custom_body_begin_file.php добавляем:
Code: Select all
<script type="text/javascript" src="/js/custom.js" /></script>
- Входим в администрирование mantis и включаем CustomContent Plugin