mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
More work
This commit is contained in:
parent
a1b7239b7e
commit
cb403a5b29
@ -8,6 +8,13 @@ extends:
|
||||
parserOptions:
|
||||
ecmaVersion: 12
|
||||
rules:
|
||||
no-var: off
|
||||
guard-for-in: off
|
||||
no-trailing-spaces: off
|
||||
camelcase: off
|
||||
padded-blocks: off
|
||||
prefer-const: off
|
||||
max-len: off
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
|
@ -12,10 +12,22 @@
|
||||
reloadTableFilters,
|
||||
*/
|
||||
|
||||
/**
|
||||
* Reload a named table
|
||||
* @param table
|
||||
*/
|
||||
function reloadtable(table) {
|
||||
$(table).bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a URL for display
|
||||
* @param {String} text
|
||||
* @param {String} url
|
||||
* @param {object} options
|
||||
* @returns link text
|
||||
*/
|
||||
function renderLink(text, url, options={}) {
|
||||
if (url === null || url === undefined || url === '') {
|
||||
return text;
|
||||
@ -63,6 +75,11 @@ function linkButtonsToSelection(table, buttons) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the input looks like a valid number
|
||||
* @param {String} n
|
||||
* @returns
|
||||
*/
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
@ -134,7 +151,6 @@ function convertQueryParameters(params, filters) {
|
||||
var ordering = params['sort'] || null;
|
||||
|
||||
if (ordering) {
|
||||
|
||||
if (order == 'desc') {
|
||||
ordering = `-${ordering}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user