SCI-5789: Fix multiple requests being triggered after saving report to inventory.

This commit is contained in:
Martin Artnik 2021-06-08 08:26:40 +02:00
parent 44b4e13fa8
commit f053083af3

View file

@ -226,7 +226,6 @@
clearDropdownResultsCallback(INVENTORY_PICKER); clearDropdownResultsCallback(INVENTORY_PICKER);
} }
function initializeSubmitAction() {
$('#content-reports-index').on('click', '#savePDFtoInventorySubmit', function() { $('#content-reports-index').on('click', '#savePDFtoInventorySubmit', function() {
animateSpinner(); animateSpinner();
$.ajax({ $.ajax({
@ -245,7 +244,6 @@
} }
}); });
}); });
}
/* /*
* INITIALIZERS * INITIALIZERS
@ -254,7 +252,6 @@
function initializeSavePDFtoInventoryModal() { function initializeSavePDFtoInventoryModal() {
$('#content-reports-index').on('shown.bs.modal', '#savePDFtoInventory', function() { $('#content-reports-index').on('shown.bs.modal', '#savePDFtoInventory', function() {
initInventoriesSelectPicker(); initInventoriesSelectPicker();
initializeSubmitAction();
clearErrors(); clearErrors();
// refresh the dropdown state // refresh the dropdown state
$('#selectInventory').parent().find('input').trigger('keyup'); $('#selectInventory').parent().find('input').trigger('keyup');