mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Use a jQuerified function
This commit is contained in:
parent
df41fafefb
commit
2046c12600
@ -191,7 +191,7 @@ function loadPartTable(table, url, options={}) {
|
||||
}
|
||||
});
|
||||
|
||||
inventreeTable(table, {
|
||||
$(table).inventreeTable({
|
||||
url: url,
|
||||
sortName: 'name',
|
||||
method: 'get',
|
||||
|
@ -47,8 +47,7 @@ function isNumeric(n) {
|
||||
/* Wrapper function for bootstrapTable.
|
||||
* Sets some useful defaults, and manage persistent settings.
|
||||
*/
|
||||
|
||||
function inventreeTable(table, options) {
|
||||
$.fn.inventreeTable = function(options) {
|
||||
|
||||
var tableName = options.name || 'table';
|
||||
|
||||
@ -66,7 +65,7 @@ function inventreeTable(table, options) {
|
||||
};
|
||||
|
||||
// Standard options for all tables
|
||||
$(table).bootstrapTable(options);
|
||||
this.bootstrapTable(options);
|
||||
}
|
||||
|
||||
function customGroupSorter(sortName, sortOrder, sortData) {
|
||||
|
@ -44,9 +44,7 @@ InvenTree | Build List
|
||||
});
|
||||
});
|
||||
|
||||
$(".build-table").bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
$(".build-table").inventreeTable({
|
||||
formatNoMatches: function() { return 'No builds found'; },
|
||||
columns: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user