Further badge tweaks

This commit is contained in:
Oliver 2021-10-28 17:57:03 +11:00
parent f8ac016d60
commit 3ce8ba85f4
4 changed files with 12 additions and 24 deletions

View File

@ -434,22 +434,6 @@
.badge { .badge {
float: right; float: right;
background-color: #777;
color: #fff;
border-radius: 5px;
margin-left: 10px;
}
.badge-alert {
background-color: #f33;
}
.badge-orange {
background-color: #fcba03;
}
.badge-green {
background-color: #1A1;
} }
.part-properties > span { .part-properties > span {

View File

@ -48,7 +48,7 @@ function addHeaderAction(label, title, icon, options) {
<span class='fas ${icon}'></span> <span class='fas ${icon}'></span>
${title} ${title}
</a> </a>
<span class='badge' id='badge-${label}'> <span class='badge rounded-pill bg-dark' id='badge-${label}'>
<span class='fas fa-spin fa-spinner'></span> <span class='fas fa-spin fa-spinner'></span>
</span> </span>
</li>` </li>`
@ -89,8 +89,12 @@ function addHeaderAction(label, title, icon, options) {
$(`#badge-${label}`).html(count); $(`#badge-${label}`).html(count);
$(`#badge-${label}`).removeClass('bg-dark');
if (count > 0) { if (count > 0) {
$(`#badge-${label}`).addClass('badge-orange'); $(`#badge-${label}`).addClass('bg-primary');
} else {
$(`#badge-${label}`).addClass('bg-warning');
} }
}); });
} }

View File

@ -61,7 +61,7 @@
<span class='fas ${icon}'></span> <span class='fas ${icon}'></span>
${title} ${title}
</a> </a>
<span class='badge' id='badge-${label}'> <span class='badge rounded-pill bg-dark' id='badge-${label}'>
<span class='fas fa-spin fa-spinner'></span> <span class='fas fa-spin fa-spinner'></span>
</span> </span>
</li>` </li>`
@ -104,8 +104,12 @@
$(`#badge-${label}`).html(count); $(`#badge-${label}`).html(count);
$(`#badge-${label}`).removeClass('bg-dark');
if (count > 0) { if (count > 0) {
$(`#badge-${label}`).addClass('badge-orange'); $(`#badge-${label}`).addClass('bg-primary');
} else {
$(`#badge-${label}`).addClass('bg-warning');
} }
}); });
} }

View File

@ -885,10 +885,6 @@ function loadStockTable(table, options) {
} }
}; };
if (!options.params.ordering) {
col['sortable'] = true;
}
columns.push(col); columns.push(col);
col = { col = {