mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Update a bunch more tables
This commit is contained in:
parent
2046c12600
commit
ae2e2f36e4
@ -42,14 +42,10 @@ function loadStockTable(table, options) {
|
|||||||
|
|
||||||
var params = options.params || {};
|
var params = options.params || {};
|
||||||
|
|
||||||
table.bootstrapTable({
|
console.log('load stock table');
|
||||||
sortable: true,
|
|
||||||
search: true,
|
table.inventreeTable({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
rememberOrder: true,
|
|
||||||
formatNoMatches: function() {
|
formatNoMatches: function() {
|
||||||
return 'No stock items matching query';
|
return 'No stock items matching query';
|
||||||
},
|
},
|
||||||
@ -387,15 +383,10 @@ function loadStockTrackingTable(table, options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
table.bootstrapTable({
|
table.inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
method: 'get',
|
method: 'get',
|
||||||
rememberOrder: true,
|
|
||||||
queryParams: options.params,
|
queryParams: options.params,
|
||||||
columns: cols,
|
columns: cols,
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
url: options.url,
|
url: options.url,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ $.fn.inventreeTable = function(options) {
|
|||||||
options.sortable = true;
|
options.sortable = true;
|
||||||
options.search = true;
|
options.search = true;
|
||||||
|
|
||||||
|
// Callback to save pagination data
|
||||||
options.onPageChange = function(number, size) {
|
options.onPageChange = function(number, size) {
|
||||||
inventreeSave(varName, size);
|
inventreeSave(varName, size);
|
||||||
};
|
};
|
||||||
|
@ -62,9 +62,7 @@ InvenTree | Allocate Parts
|
|||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
$("#build-list").bootstrapTable({
|
$("#build-list").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btn-allocate").click(function() {
|
$("#btn-allocate").click(function() {
|
||||||
|
@ -45,12 +45,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#part-table").bootstrapTable({
|
$("#part-table").inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
formatNoMatches: function() { return "No supplier parts found for {{ company.name }}"; },
|
formatNoMatches: function() { return "No supplier parts found for {{ company.name }}"; },
|
||||||
queryParams: function(p) {
|
queryParams: function(p) {
|
||||||
return {
|
return {
|
||||||
|
@ -42,9 +42,7 @@
|
|||||||
newOrder();
|
newOrder();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#po-table").bootstrapTable({
|
$(".po-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -32,12 +32,7 @@ InvenTree | Supplier List
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#company-table").bootstrapTable({
|
$("#company-table").inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
formatNoMatches: function() { return "No company information found"; },
|
formatNoMatches: function() { return "No company information found"; },
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<table class='table table-striped table-condensed' id='po-table' {% if toolbar %}data-toolbar='{{ toolbar }}'{% endif %}>
|
<table class='table table-striped table-condensed po-table' id='po-table' {% if toolbar %}data-toolbar='{{ toolbar }}'{% endif %}>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field='company' data-sortable='true' data-searchable='true'>Company</th>
|
<th data-field='company' data-sortable='true' data-searchable='true'>Company</th>
|
||||||
|
@ -221,9 +221,7 @@ $('#new-po-line').click(function() {
|
|||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
$("#po-lines-table").bootstrapTable({
|
$("#po-lines-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,8 +32,7 @@ $("#po-create").click(function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#po-table").bootstrapTable({
|
$("#po-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -29,9 +29,7 @@
|
|||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
|
|
||||||
$("#build-table").bootstrapTable({
|
$("#build-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: 'Build',
|
title: 'Build',
|
||||||
|
@ -89,9 +89,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#attachment-table").bootstrapTable({
|
$("#attachment-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -31,12 +31,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#build-table").bootstrapTable({
|
$("#build-table").inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
queryParams: function(p) {
|
queryParams: function(p) {
|
||||||
return {
|
return {
|
||||||
part: {{ part.id }},
|
part: {{ part.id }},
|
||||||
|
@ -26,9 +26,7 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$("#po-table").bootstrapTable({
|
$("#po-table").inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#part-order2").click(function() {
|
$("#part-order2").click(function() {
|
||||||
|
@ -44,9 +44,7 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$('#param-table').bootstrapTable({
|
$('#param-table').inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#param-create').click(function() {
|
$('#param-create').click(function() {
|
||||||
|
@ -50,9 +50,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#supplier-table").bootstrapTable({
|
$("#supplier-table").inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
formatNoMatches: function() { return "No supplier parts available for {{ part.full_name }}"; },
|
formatNoMatches: function() { return "No supplier parts available for {{ part.full_name }}"; },
|
||||||
queryParams: function(p) {
|
queryParams: function(p) {
|
||||||
return {
|
return {
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$("#used-table").bootstrapTable({
|
$("#used-table").inventreeTable({
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
formatNoMatches: function() { return "{{ part.full_name }} is not used to make any other parts"; },
|
formatNoMatches: function() { return "{{ part.full_name }} is not used to make any other parts"; },
|
||||||
queryParams: function(p) {
|
queryParams: function(p) {
|
||||||
return {
|
return {
|
||||||
|
@ -53,9 +53,7 @@
|
|||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
|
|
||||||
$('#variant-table').bootstrapTable({
|
$('#variant-table').inventreeTable({
|
||||||
search: true,
|
|
||||||
sortable: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#new-variant').click(function() {
|
$('#new-variant').click(function() {
|
||||||
|
@ -83,7 +83,7 @@ InvenTree | Search Results
|
|||||||
|
|
||||||
onSearchResults('#supplier-part-results-table', '#supplier-part-result-count');
|
onSearchResults('#supplier-part-results-table', '#supplier-part-result-count');
|
||||||
|
|
||||||
$("#category-results-table").bootstrapTable({
|
$("#category-results-table").inventreeTable({
|
||||||
url: "{% url 'api-part-category-list' %}",
|
url: "{% url 'api-part-category-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
search: "{{ query }}",
|
search: "{{ query }}",
|
||||||
@ -103,7 +103,7 @@ InvenTree | Search Results
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#location-results-table").bootstrapTable({
|
$("#location-results-table").inventreeTable({
|
||||||
url: "{% url 'api-location-list' %}",
|
url: "{% url 'api-location-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
search: "{{ query }}",
|
search: "{{ query }}",
|
||||||
@ -134,15 +134,11 @@ InvenTree | Search Results
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#company-results-table").bootstrapTable({
|
$("#company-results-table").inventreeTable({
|
||||||
url: "{% url 'api-company-list' %}",
|
url: "{% url 'api-company-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
search: "{{ query }}",
|
search: "{{ query }}",
|
||||||
},
|
},
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
search: true,
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
@ -158,15 +154,11 @@ InvenTree | Search Results
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#supplier-part-results-table").bootstrapTable({
|
$("#supplier-part-results-table").inventreeTable({
|
||||||
url: "{% url 'api-part-supplier-list' %}",
|
url: "{% url 'api-part-supplier-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
search: "{{ query }}",
|
search: "{{ query }}",
|
||||||
},
|
},
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
search: true,
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
field: 'supplier_name',
|
field: 'supplier_name',
|
||||||
|
@ -19,16 +19,11 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$("#currency-table").bootstrapTable({
|
$("#currency-table").inventreeTable({
|
||||||
url: "{% url 'api-currency-list' %}",
|
url: "{% url 'api-currency-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
ordering: 'suffix'
|
ordering: 'suffix'
|
||||||
},
|
},
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
formatNoMatches: function() { return "No currencies found"; },
|
formatNoMatches: function() { return "No currencies found"; },
|
||||||
rowStyle: function(row, index) {
|
rowStyle: function(row, index) {
|
||||||
if (row.base) {
|
if (row.base) {
|
||||||
|
@ -19,16 +19,11 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$("#param-table").bootstrapTable({
|
$("#param-table").inventreeTable({
|
||||||
url: "{% url 'api-part-param-template-list' %}",
|
url: "{% url 'api-part-param-template-list' %}",
|
||||||
queryParams: {
|
queryParams: {
|
||||||
ordering: 'name',
|
ordering: 'name',
|
||||||
},
|
},
|
||||||
sortable: true,
|
|
||||||
search: true,
|
|
||||||
pagination: true,
|
|
||||||
pageSize: 50,
|
|
||||||
pageList: [25, 50, 100, 'all'],
|
|
||||||
formatNoMatches: function() { return "No part parameter templates found"; },
|
formatNoMatches: function() { return "No part parameter templates found"; },
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user