2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Rename some fields

- Oops didn't think that through, gotta go through and fix the data now...
This commit is contained in:
Oliver Walters
2019-06-02 19:46:30 +10:00
parent fd2e2a71f9
commit ba26acd487
14 changed files with 97 additions and 21 deletions

View File

@ -37,17 +37,28 @@ InvenTree | Search Results
function onSearchResults(table, output) {
$(table).on('load-success.bs.table', function() {
var panel = $(output).parent('.panel-group');
var n = $(table).bootstrapTable('getData').length;
var text = '';
if (n == 0) {
text = '<i>No results</i>'
$(panel).hide();
$(table).hide();
} else {
text = n + ' result';
if (n > 1) {
text += 's';
}
$(panel).show();
}
$(output).html(text);