From b1a642918c091f5b50647367b56f458458eca457 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:36:18 +1000 Subject: [PATCH] Add translation layer for stock.js --- .../static/script/inventree/stock.js | 374 ------------------ InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 1 + InvenTree/templates/js/stock.js | 360 +++++++++++++++++ 4 files changed, 362 insertions(+), 374 deletions(-) create mode 100644 InvenTree/templates/js/stock.js diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index 4e4b61aa93..950b0260e4 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -2,19 +2,6 @@ * Requires api.js to be loaded first */ -function getStockList(filters={}, options={}) { - return inventreeGet('/api/stock/', filters, options); -} - -function getStockDetail(pk, options={}) { - return inventreeGet('/api/stock/' + pk + '/', {}, options) -} - -function getStockLocations(filters={}, options={}) { - return inventreeGet('/api/stock/location/', filters, options) -} - - /* Functions for interacting with stock management forms */ @@ -29,367 +16,6 @@ function removeStockRow(e) { $('#' + row).remove(); } - -function loadStockTable(table, options) { - /* Load data into a stock table with adjustable options. - * Fetches data (via AJAX) and loads into a bootstrap table. - * Also links in default button callbacks. - * - * Options: - * url - URL for the stock query - * params - query params for augmenting stock data request - * groupByField - Column for grouping stock items - * buttons - Which buttons to link to stock selection callbacks - * filterList -