fix: replace truncated jszip.min.js with complete bundle
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
emmy/
|
||||||
+10
-2
@@ -29,6 +29,13 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
initDOMElements();
|
initDOMElements();
|
||||||
setupEventListeners();
|
setupEventListeners();
|
||||||
initDatePresets();
|
initDatePresets();
|
||||||
|
|
||||||
|
if (window.JSZip || typeof JSZip !== 'undefined') {
|
||||||
|
log('Zip compression engine initialized (JSZip v3.10.1).', 'info');
|
||||||
|
} else {
|
||||||
|
log('Warning: JSZip library not detected on page load.', 'warn');
|
||||||
|
}
|
||||||
|
|
||||||
await checkSessionAndDiscoverStudents();
|
await checkSessionAndDiscoverStudents();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -652,14 +659,15 @@ async function fetchMediaBlob(url) {
|
|||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
async function buildAndDownloadZip(studentProfile) {
|
async function buildAndDownloadZip(studentProfile) {
|
||||||
if (typeof JSZip === 'undefined') {
|
const JSZipClass = window.JSZip || (typeof JSZip !== 'undefined' ? JSZip : null);
|
||||||
|
if (!JSZipClass) {
|
||||||
throw new Error('JSZip library is not loaded.');
|
throw new Error('JSZip library is not loaded.');
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProgress(88, 'Generating ZIP package...');
|
updateProgress(88, 'Generating ZIP package...');
|
||||||
log('Packaging media and manifests into ZIP archive...', 'info');
|
log('Packaging media and manifests into ZIP archive...', 'info');
|
||||||
|
|
||||||
const zip = new JSZip();
|
const zip = new JSZipClass();
|
||||||
const childName = sanitizeFilename(`${studentProfile.first_name || 'Child'}_${studentProfile.last_name || ''}`).trim() || 'Brightwheel_Archive';
|
const childName = sanitizeFilename(`${studentProfile.first_name || 'Child'}_${studentProfile.last_name || ''}`).trim() || 'Brightwheel_Archive';
|
||||||
const rootFolder = zip.folder(childName);
|
const rootFolder = zip.folder(childName);
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user