Fix: Colors must be set into CSS.

This commit is contained in:
Laurent Destailleur
2012-11-03 11:55:39 +01:00
parent 7fd16c3a7e
commit d3491e9ac0
4 changed files with 11 additions and 8 deletions

View File

@@ -1236,14 +1236,8 @@ class Form
$opt.= ($objp->rowid == $selected)?' selected="selected"':'';
if (! empty($conf->stock->enabled) && $objp->fk_product_type == 0 && isset($objp->stock))
{
if ($objp->stock > 0)
{
$opt.= ' style="background-color:#32CD32; color:#F5F5F5;"';
}
else if ($objp->stock <= 0)
{
$opt.= ' style="background-color:#FF0000; color:#F5F5F5;"';
}
if ($objp->stock > 0) $opt.= ' class="product_line_stock_ok"';
else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"';
}
$opt.= '>';
$opt.= $objp->ref.' - '.dol_trunc($label,32).' - ';

View File

@@ -1497,6 +1497,9 @@ a.impayee:hover { font-weight: bold; color: #550000; }
* Other
*/
.product_line_stock_ok { color: #002200; }
.product_line_stock_too_low { color: #664400; }
.fieldrequired { font-weight: bold; color: #000055; }
.photo {

View File

@@ -1657,6 +1657,9 @@ a.impayee:hover { font-weight: bold; color: #550000; }
* Other
*/
.product_line_stock_ok { color: #002200; }
.product_line_stock_too_low { color: #664400; }
.fieldrequired { font-weight: bold; color: #000055; }
.photo {

View File

@@ -1825,6 +1825,9 @@ a.impayee:hover { font-weight: bold; color: #550000; }
* Other
*/
.product_line_stock_ok { color: #002200; }
.product_line_stock_too_low { color: #664400; }
.fieldrequired { font-weight: bold; color: #000055; }
.photo {