added sfloader for file uploads.
This commit is contained in:
@@ -90,9 +90,10 @@ function saveVehicle(isEdit) {
|
||||
}
|
||||
});
|
||||
}
|
||||
function uploadFileAsync() {
|
||||
function uploadFileAsync(event) {
|
||||
let formData = new FormData();
|
||||
formData.append("file", $("#inputImage")[0].files[0]);
|
||||
formData.append("file", event.files[0]);
|
||||
sloader.show();
|
||||
$.ajax({
|
||||
url: "/Files/HandleFileUpload",
|
||||
data: formData,
|
||||
@@ -101,6 +102,7 @@ function uploadFileAsync() {
|
||||
contentType: false,
|
||||
type: 'POST',
|
||||
success: function (response) {
|
||||
sloader.hide();
|
||||
if (response.trim() != '') {
|
||||
uploadedFile = response;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,17 @@ function editVehicle(vehicleId) {
|
||||
function hideEditVehicleModal() {
|
||||
$('#editVehicleModal').modal('hide');
|
||||
}
|
||||
function showBulkImportModal(mode) {
|
||||
$.get(`/Vehicle/GetBulkImportModalPartialView?mode=${mode}`, function (data) {
|
||||
if (data) {
|
||||
$("#bulkImportModalContent").html(data);
|
||||
$("#bulkImportModal").modal('show');
|
||||
}
|
||||
})
|
||||
}
|
||||
function hideBulkImportModal(){
|
||||
$("#bulkImportModal").modal('hide');
|
||||
}
|
||||
function deleteVehicle(vehicleId) {
|
||||
Swal.fire({
|
||||
title: "Confirm Deletion?",
|
||||
|
||||
Reference in New Issue
Block a user