2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 05:48:47 +00:00

Improve progress bar rendering

This commit is contained in:
Oliver Walters 2020-04-23 09:20:18 +10:00
parent a803f21e0c
commit 1a0f091e0c
2 changed files with 9 additions and 2 deletions

View File

@ -40,12 +40,17 @@
.progress-bar { .progress-bar {
opacity: 60%; opacity: 60%;
background: #2aa02a;
} }
.progress-bar-exceed { .progress-bar-under {
background: #eeaa33; background: #eeaa33;
} }
.progress-bar-over {
background: #337ab7;
}
.progress-value { .progress-value {
width: 100%; width: 100%;
color: #333; color: #333;

View File

@ -116,7 +116,9 @@ function makeProgressBar(value, maximum, opts) {
var extraclass = ''; var extraclass = '';
if (value > maximum) { if (value > maximum) {
extraclass='progress-bar-exceed'; extraclass='progress-bar-over';
} else if (value < maximum) {
extraclass = 'progress-bar-under';
} }
var id = opts.id || 'progress-bar'; var id = opts.id || 'progress-bar';