mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix order of javascript table events
This commit is contained in:
parent
d59c6711bb
commit
c9ea33e22e
@ -45,6 +45,7 @@ $("#so-lines-table").inventreeTable({
|
|||||||
allocations: true,
|
allocations: true,
|
||||||
},
|
},
|
||||||
url: "{% url 'api-so-line-list' %}",
|
url: "{% url 'api-so-line-list' %}",
|
||||||
|
onPostBody: setupCallbacks,
|
||||||
detailViewByClick: true,
|
detailViewByClick: true,
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFilter: function(index, row) {
|
detailFilter: function(index, row) {
|
||||||
@ -201,10 +202,9 @@ function reloadTable() {
|
|||||||
$("#so-lines-table").bootstrapTable("refresh");
|
$("#so-lines-table").bootstrapTable("refresh");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the table is loaded
|
function setupCallbacks(table) {
|
||||||
$("#so-lines-table").on('load-success.bs.table', function() {
|
|
||||||
|
|
||||||
var table = $(this);
|
var table = $("#so-lines-table");
|
||||||
|
|
||||||
// Set up callbacks for the row buttons
|
// Set up callbacks for the row buttons
|
||||||
table.find(".button-edit").click(function() {
|
table.find(".button-edit").click(function() {
|
||||||
@ -255,7 +255,6 @@ $("#so-lines-table").on('load-success.bs.table', function() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user