2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 13:35:40 +00:00

More tweaks

This commit is contained in:
Oliver
2021-10-30 13:18:11 +11:00
parent c4c533bee0
commit a689b77cfb
5 changed files with 61 additions and 38 deletions

View File

@ -27,7 +27,7 @@ function loadAttachmentTable(url, options) {
return '{% trans "No attachments found" %}';
},
sortable: true,
search: false,
search: true,
queryParams: options.filters || {},
onPostBody: function() {
// Add callback for 'edit' button
@ -58,12 +58,16 @@ function loadAttachmentTable(url, options) {
var fn = value.toLowerCase();
if (fn.endsWith('.pdf')) {
if (fn.endsWith('.csv')) {
icon = 'fa-file-csv';
} else if (fn.endsWith('.pdf')) {
icon = 'fa-file-pdf';
} else if (fn.endsWith('.xls') || fn.endsWith('.xlsx')) {
icon = 'fa-file-excel';
} else if (fn.endsWith('.doc') || fn.endsWith('.docx')) {
icon = 'fa-file-word';
} else if (fn.endsWith('.zip') || fn.endsWith('.7z')) {
icon = 'fa-file-archive';
} else {
var images = ['.png', '.jpg', '.bmp', '.gif', '.svg', '.tif'];

View File

@ -453,14 +453,14 @@ function removeStockRow(e) {
function passFailBadge(result) {
if (result) {
return `<span class='badge rounded-pill bg-success'>{% trans "PASS" %}</span>`;
return `<span class='badge badge-right rounded-pill bg-success'>{% trans "PASS" %}</span>`;
} else {
return `<span class='badge rounded-pill bg-danger'>{% trans "FAIL" %}</span>`;
return `<span class='badge badge-right rounded-pill bg-danger'>{% trans "FAIL" %}</span>`;
}
}
function noResultBadge() {
return `<span class='badge rounded-pill bg-info'>{% trans "NO RESULT" %}</span>`;
return `<span class='badge badge-right rounded-pill bg-info'>{% trans "NO RESULT" %}</span>`;
}
function formatDate(row) {