diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 3b7c95e245..fe22111232 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -502,11 +502,24 @@ LANGUAGE_CODE = CONFIG.get('language', 'en-us') # If a new language translation is supported, it must be added here LANGUAGES = [ - ('en', _('English')), - ('fr', _('French')), ('de', _('German')), + ('el', _('Greek')), + ('en', _('English')), + ('es', _('Spanish')), + ('fr', _('French')), + ('he', _('Hebrew')), + ('it', _('Italian')), + ('ja', _('Japanese')), + ('ko', _('Korean')), + ('nl', _('Dutch')), + ('no', _('Norwegian')), ('pl', _('Polish')), + ('ru', _('Russian')), + ('sv', _('Swedish')), + ('th', _('Thai')), ('tr', _('Turkish')), + ('vi', _('Vietnamese')), + ('zh-cn', _('Chinese')), ] # Currencies available for use diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html index 4a9ac43758..884ec6e8de 100644 --- a/InvenTree/company/templates/company/detail.html +++ b/InvenTree/company/templates/company/detail.html @@ -371,7 +371,7 @@ requests.push(inventreeDelete(url)); }); - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { $('#supplier-part-table').bootstrapTable('refresh'); }); } diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html index 94ff64440f..4623eb3a07 100644 --- a/InvenTree/company/templates/company/manufacturer_part.html +++ b/InvenTree/company/templates/company/manufacturer_part.html @@ -207,7 +207,7 @@ $("#supplier-part-delete").click(function() { requests.push(inventreeDelete(url)); }); - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { reloadSupplierPartTable(); }); } @@ -247,7 +247,7 @@ $("#multi-parameter-delete").click(function() { requests.push(inventreeDelete(url)); }); - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { $('#parameter-table').bootstrapTable('refresh'); }); } diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index b4cebe478e..00d7f01e47 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -416,7 +416,7 @@ }); // Wait for *all* the requests to complete - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { location.reload(); }); } @@ -832,7 +832,7 @@ requests.push(inventreeDelete(url)); }); - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { reloadSupplierPartTable(); }); } diff --git a/InvenTree/templates/js/api.js b/InvenTree/templates/js/api.js index 8169671836..4cf07638dc 100644 --- a/InvenTree/templates/js/api.js +++ b/InvenTree/templates/js/api.js @@ -147,8 +147,7 @@ function inventreeDelete(url, options={}) { options.method = 'DELETE'; - inventreePut(url, {}, options); - + return inventreePut(url, {}, options); } diff --git a/InvenTree/templates/js/company.js b/InvenTree/templates/js/company.js index b202fbcd52..f671fb616f 100644 --- a/InvenTree/templates/js/company.js +++ b/InvenTree/templates/js/company.js @@ -349,7 +349,7 @@ function deleteManufacturerParts(selections, options={}) { }); // Wait for all the requests to complete - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { if (options.onSuccess) { options.onSuccess(); diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 947e7fb3e9..a2015797fe 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -287,7 +287,7 @@ function adjustStock(action, items, options={}) { }); // Wait for *all* the requests to complete - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { // Destroy the modal window $(modal).modal('hide'); @@ -1265,7 +1265,7 @@ function loadStockTable(table, options) { ); }); - $.when.apply($, requests).then(function() { + $.when.apply($, requests).done(function() { $("#stock-table").bootstrapTable('refresh'); }); })