Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +55 -61
templates/index.html
CHANGED
@@ -148,7 +148,7 @@
|
|
148 |
}
|
149 |
|
150 |
.disabled {
|
151 |
-
cursor:
|
152 |
}
|
153 |
|
154 |
/* Responsive design */
|
@@ -210,66 +210,60 @@
|
|
210 |
</div>
|
211 |
|
212 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
-
|
245 |
-
// After processing is complete (You can adjust this based on your logic)
|
246 |
-
const processingMessage = document.getElementById('processing-message');
|
247 |
-
if (processingMessage) {
|
248 |
-
processingMessage.remove(); // Remove the processing message
|
249 |
-
}
|
250 |
-
|
251 |
-
// Re-enable tab buttons and remove disabled class
|
252 |
-
const buttons = document.querySelectorAll('.tab button');
|
253 |
-
buttons.forEach(button => {
|
254 |
-
button.removeAttribute('disabled');
|
255 |
-
button.classList.remove('disabled'); // Remove disabled class
|
256 |
-
});
|
257 |
-
|
258 |
-
// Reset cursor to default
|
259 |
-
document.body.style.cursor = 'auto';
|
260 |
-
}, 3000); // Adjust timing based on your upload duration
|
261 |
-
|
262 |
-
// Function to open links in the same tab
|
263 |
-
function openLink(url, element) {
|
264 |
-
window.location.href = url; // Redirects to the specified URL in the same tab
|
265 |
-
|
266 |
-
// Remove "active" class from all buttons
|
267 |
-
const buttons = document.querySelectorAll('.tab button');
|
268 |
-
buttons.forEach(button => button.classList.remove('active'));
|
269 |
-
|
270 |
-
// Add "active" class to the clicked button
|
271 |
-
element.classList.add('active');
|
272 |
-
}
|
273 |
-
</script>
|
274 |
</body>
|
275 |
</html>
|
|
|
148 |
}
|
149 |
|
150 |
.disabled {
|
151 |
+
cursor: not-allowed !important; /* Set cursor to not-allowed */
|
152 |
}
|
153 |
|
154 |
/* Responsive design */
|
|
|
210 |
</div>
|
211 |
|
212 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
213 |
+
<script>
|
214 |
+
// Loader functionality
|
215 |
+
document.getElementById('fileUploadForm').onsubmit = function() {
|
216 |
+
document.getElementById('loader').style.display = 'block';
|
217 |
+
|
218 |
+
// Disable the tab buttons and apply disabled class
|
219 |
+
const buttons = document.querySelectorAll('.tab button');
|
220 |
+
buttons.forEach(button => {
|
221 |
+
button.setAttribute('disabled', 'true');
|
222 |
+
button.classList.add('disabled'); // Add disabled class
|
223 |
+
});
|
224 |
+
|
225 |
+
// Show processing message
|
226 |
+
const processingMessage = document.createElement('p');
|
227 |
+
processingMessage.id = 'processing-message';
|
228 |
+
processingMessage.textContent = 'Processing, please wait...';
|
229 |
+
processingMessage.style.color = '#e68a00'; // Style as needed
|
230 |
+
document.querySelector('.file-upload-section').appendChild(processingMessage);
|
231 |
+
};
|
232 |
+
|
233 |
+
// Flash message auto-hide
|
234 |
+
setTimeout(function () {
|
235 |
+
let flashMessage = document.getElementById("flash-message");
|
236 |
+
if (flashMessage) {
|
237 |
+
flashMessage.style.transition = "opacity 1s ease";
|
238 |
+
flashMessage.style.opacity = 0;
|
239 |
+
setTimeout(() => flashMessage.remove(), 1000);
|
240 |
+
}
|
241 |
+
|
242 |
+
// After processing is complete (You can adjust this based on your logic)
|
243 |
+
const processingMessage = document.getElementById('processing-message');
|
244 |
+
if (processingMessage) {
|
245 |
+
processingMessage.remove(); // Remove the processing message
|
246 |
+
}
|
247 |
+
|
248 |
+
// Re-enable tab buttons and remove disabled class
|
249 |
+
const buttons = document.querySelectorAll('.tab button');
|
250 |
+
buttons.forEach(button => {
|
251 |
+
button.removeAttribute('disabled');
|
252 |
+
button.classList.remove('disabled'); // Remove disabled class
|
253 |
+
});
|
254 |
+
}, 3000); // Adjust timing based on your upload duration
|
255 |
+
|
256 |
+
// Function to open links in the same tab
|
257 |
+
function openLink(url, element) {
|
258 |
+
window.location.href = url; // Redirects to the specified URL in the same tab
|
259 |
+
|
260 |
+
// Remove "active" class from all buttons
|
261 |
+
const buttons = document.querySelectorAll('.tab button');
|
262 |
+
buttons.forEach(button => button.classList.remove('active'));
|
263 |
+
|
264 |
+
// Add "active" class to the clicked button
|
265 |
+
element.classList.add('active');
|
266 |
}
|
267 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
</body>
|
269 |
</html>
|