give partially unused order articles a distinct colour

This commit is contained in:
wvengen 2014-06-04 10:05:18 +02:00
parent fee0cfbdc7
commit 2bf13dbefa
4 changed files with 15 additions and 4 deletions

View file

@ -119,7 +119,7 @@ function update(item, quantity, tolerance) {
// update missing units
var missing_units = unit[item] - (((quantityOthers[item] + Number(quantity)) % unit[item]) + Number(tolerance) + toleranceOthers[item])
if (missing_units < 0) {
if (missing_units < 0 || missing_units == unit[item]) {
missing_units = 0;
}
$('#missing_units_' + item).html(String(missing_units));

View file

@ -38,6 +38,7 @@ body {
// article status
@articleUsedColor: green;
@articlePartusedColor: #d50;
@articleUnusedColor: red;
@articleUnavailColor: #999;
@articleUpdatedColor: #468847;
@ -158,6 +159,9 @@ table {
.unused {
color: @articleUnusedColor;
}
.partused {
color: @articlePartusedColor;
}
#order-footer, .article-info {
text-align: left;
@ -253,6 +257,7 @@ td.symbol, th.symbol {
.symbol { color: tint(@textColor, @nonessentialDim); }
.used .symbol { color: tint(@articleUsedColor, @nonessentialDim); }
.unused .symbol { color: tint(@articleUnusedColor, @nonessentialDim); }
.partused .symbol { color: tint(@articlePartusedColor, @nonessentialDim); }
.unavailable .symbol { color: @articleUnavailColor; }
// hide symbols completely on small screens to save space
@ -359,6 +364,7 @@ i.package.icon-only {
.package { color: tint(@textColor, @nonessentialDim); }
.used .package { color: tint(@articleUsedColor, @nonessentialDim); }
.unused .package { color: tint(@articleUnusedColor, @nonessentialDim); }
.partused .package { color: tint(@articlePartusedColor, @nonessentialDim); }
.unavailable .package { color: @articleUnavailColor; }
// very small inputs - need !important for responsive selectors