mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #1867 from SchrodingersGat/delete-fix
inventreeDelete was not returning the promise
This commit is contained in:
commit
de2d9b30ec
@ -371,7 +371,7 @@
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
$('#supplier-part-table').bootstrapTable('refresh');
|
||||
});
|
||||
}
|
||||
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
@ -147,8 +147,7 @@ function inventreeDelete(url, options={}) {
|
||||
|
||||
options.method = 'DELETE';
|
||||
|
||||
inventreePut(url, {}, options);
|
||||
|
||||
return inventreePut(url, {}, options);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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');
|
||||
});
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user