WebashalarForML commited on
Commit
2ffa5f1
·
verified ·
1 Parent(s): 09388a6

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +35 -14
templates/index.html CHANGED
@@ -209,27 +209,48 @@
209
  // Loader functionality
210
  document.getElementById('fileUploadForm').onsubmit = function() {
211
  document.getElementById('loader').style.display = 'block';
 
 
 
 
 
 
 
 
 
 
 
212
  };
213
-
214
  // Flash message auto-hide
215
  setTimeout(function () {
216
  let flashMessage = document.getElementById("flash-message");
217
- if (flashMessage) {
218
- flashMessage.style.transition = "opacity 1s ease";
219
- flashMessage.style.opacity = 0;
220
  setTimeout(() => flashMessage.remove(), 1000);
221
  }
222
- }, 3000);
223
-
224
- // Function to open links in the same tab
225
- function openLink(url) {
226
- window.location.href = url; // Redirects to the specified URL in the same tab
227
- // Remove "active" class from all buttons
228
- const buttons = document.querySelectorAll('.tab button');
229
- buttons.forEach(button => button.classList.remove('active'));
230
- // Add "active" class to the clicked button
231
- element.classList.add('active');
232
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  </script>
234
  </body>
235
  </html>
 
209
  // Loader functionality
210
  document.getElementById('fileUploadForm').onsubmit = function() {
211
  document.getElementById('loader').style.display = 'block';
212
+ // Disable the tab buttons
213
+ const buttons = document.querySelectorAll('.tab button');
214
+ buttons.forEach(button => {
215
+ button.setAttribute('disabled', 'true');
216
+ });
217
+ // Show processing message
218
+ const processingMessage = document.createElement('p');
219
+ processingMessage.id = 'processing-message';
220
+ processingMessage.textContent = 'Processing, please wait...';
221
+ processingMessage.style.color = '#e68a00'; // Style as needed
222
+ document.querySelector('.file-upload-section').appendChild(processingMessage);
223
  };
224
+
225
  // Flash message auto-hide
226
  setTimeout(function () {
227
  let flashMessage = document.getElementById("flash-message");
228
+ if (flashMessage) {
229
+ flashMessage.style.transition = "opacity 1s ease";
230
+ flashMessage.style.opacity = 0;
231
  setTimeout(() => flashMessage.remove(), 1000);
232
  }
233
+ // After processing is complete (You can adjust this based on your logic)
234
+ const processingMessage = document.getElementById('processing-message');
235
+ if (processingMessage) {
236
+ processingMessage.remove(); // Remove the processing message
 
 
 
 
 
 
237
  }
238
+ // Re-enable tab buttons
239
+ const buttons = document.querySelectorAll('.tab button');
240
+ buttons.forEach(button => {
241
+ button.removeAttribute('disabled');
242
+ });
243
+ }, 3000); // Adjust timing based on your upload duration
244
+
245
+ // Function to open links in the same tab
246
+ function openLink(url) {
247
+ window.location.href = url; // Redirects to the specified URL in the same tab
248
+ // Remove "active" class from all buttons
249
+ const buttons = document.querySelectorAll('.tab button');
250
+ buttons.forEach(button => button.classList.remove('active'));
251
+ // Add "active" class to the clicked button
252
+ element.classList.add('active');
253
+ }
254
  </script>
255
  </body>
256
  </html>