[ADD] LOAD DATA: New app for loading demo data to a blank database on user preference

This commit is contained in:
Horilla
2024-09-21 15:16:52 +05:30
parent 0ef7e034f2
commit 3c68141e88
19 changed files with 26362 additions and 419 deletions

View File

@@ -443,3 +443,19 @@ $(document).on('keydown', function (event) {
}
}
});
function handleDownloadAndRefresh(event, url) {
// Use in import_popup.html file
event.preventDefault();
// Create a temporary hidden iframe to trigger the download
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = url;
document.body.appendChild(iframe);
// Refresh the page after a short delay
setTimeout(function () {
document.body.removeChild(iframe); // Clean up the iframe
window.location.reload(); // Refresh the page
}, 500); // Adjust the delay as needed
}