diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index 9e00860e0d..dd90019339 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -275,7 +275,7 @@ function loadStockTrackingTable(table, options) { formatter: function(value, row, index, field) { var m = moment(value); if (m.isValid()) { - var html = m.format('dddd MMMM Do YYYY') + '
' + m.format('h:mm a'); + var html = m.format('dddd MMMM Do YYYY'); // + '
' + m.format('h:mm a'); return html; } @@ -308,6 +308,10 @@ function loadStockTrackingTable(table, options) { html += "
" + row.notes + ""; } + if (row.URL) { + html += "
" + row.URL + ""; + } + return html; } }); @@ -339,7 +343,7 @@ function loadStockTrackingTable(table, options) { formatter: function(value, row, index, field) { // Manually created entries can be edited or deleted if (!row.system) { - var bEdit = ""; + var bEdit = ""; var bDel = ""; return "
" + bEdit + bDel + "
"; @@ -364,4 +368,12 @@ function loadStockTrackingTable(table, options) { if (options.buttons) { linkButtonsToSelection(table, options.buttons); } + + table.on('click', '.btn-entry-edit', function() { + var button = $(this); + + launchModalForm(button.attr('url'), { + reload: true, + }); + }); } \ No newline at end of file