From 0e4b986e81f8132a44e61fa8df18860301cc3468 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 20:31:10 +0000
Subject: [PATCH] =JakeVan preliminary additions

---
 assets/js/concise/UtilityFunctions.js |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/assets/js/concise/UtilityFunctions.js b/assets/js/concise/UtilityFunctions.js
index 3b9e355..4a7b85b 100644
--- a/assets/js/concise/UtilityFunctions.js
+++ b/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

--
Gitblit v1.10.0