NEW Color category is visible onto the thumb of tags on thirdparty, or
products cards.
This commit is contained in:
parent
c8e0839296
commit
4195eb3366
@ -4670,7 +4670,7 @@ class Form
|
|||||||
*
|
*
|
||||||
* @param int $id Id of object
|
* @param int $id Id of object
|
||||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated.
|
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated.
|
||||||
* @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect
|
* @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect (recommended)
|
||||||
* @return mixed Array of category objects or < 0 if KO
|
* @return mixed Array of category objects or < 0 if KO
|
||||||
*/
|
*/
|
||||||
function showCategories($id, $type, $rendermode=0)
|
function showCategories($id, $type, $rendermode=0)
|
||||||
@ -4687,10 +4687,10 @@ class Form
|
|||||||
$toprint = array();
|
$toprint = array();
|
||||||
foreach($categories as $c)
|
foreach($categories as $c)
|
||||||
{
|
{
|
||||||
$ways = $c->print_all_ways();
|
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text
|
||||||
foreach($ways as $way)
|
foreach($ways as $way)
|
||||||
{
|
{
|
||||||
$toprint[] = '<li class="select2-search-choice-dolibarr">'.img_object('','category').' '.$way.'</li>';
|
$toprint[] = '<li class="select2-search-choice-dolibarr"'.($c->color?' style="background: #'.$c->color.'"':'').'>'.img_object('','category').' '.$way.'</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
return '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||||
|
|||||||
@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user