Jake Vanderwerf
2026-01-01 8d0e2130627497b55b1a61cbe374bfb309ef2f27
assets/js/concise/UtilityFunctions.js
@@ -274,6 +274,26 @@
   return div.innerHTML;
}
window.generateID = function(prefix = 'jvb') {
   return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2,9)}`;
}
window.showProgress = function(elements, current, total, message = '', icon = '') {
   const show = current < total;
   if (elements.progress && show) {
      window.fade(elements.progress, true);
   }
   const percent = total > 0 ? (current / total) * 100 : 0;
   if (elements.fill) elements.fill.style.width = `${percent}%`;
   if (elements.details) elements.details.textContent = message;
   if (elements.count) elements.count.textContent = `${current}/${total}`;
   if (elements.icon) elements.icon.className = (icon === '') ? 'icon' : 'icon icon-'+icon;
   if (elements.progress && current === total) {
      window.fade(elements.progress, false);
   }
}
/**
 * Format a date string for display
 * @param {string} dateString - ISO date string