diff --git a/web_interface/static/v3/app.js b/web_interface/static/v3/app.js index ad019f10..9580100d 100644 --- a/web_interface/static/v3/app.js +++ b/web_interface/static/v3/app.js @@ -1,3 +1,4 @@ +/* global showNotification */ // LED Matrix v3 JavaScript // Additional helpers for HTMX and Alpine.js integration @@ -57,7 +58,7 @@ window.reconnectSSE = function() { window.statsSource = new EventSource('/api/v3/stream/stats'); window.statsSource.onmessage = function(event) { const data = JSON.parse(event.data); - updateSystemStats(data); + if (typeof updateSystemStats === 'function') updateSystemStats(data); }; } diff --git a/web_interface/static/v3/js/htmx-json-enc.js b/web_interface/static/v3/js/htmx-json-enc.js index db0aa36f..5e2dcb51 100644 --- a/web_interface/static/v3/js/htmx-json-enc.js +++ b/web_interface/static/v3/js/htmx-json-enc.js @@ -1,3 +1,4 @@ +/* global htmx */ htmx.defineExtension('json-enc', { onEvent: function (name, evt) { if (name === "htmx:configRequest") { diff --git a/web_interface/static/v3/js/htmx-sse.js b/web_interface/static/v3/js/htmx-sse.js index 943d80ac..49fe1b8f 100644 --- a/web_interface/static/v3/js/htmx-sse.js +++ b/web_interface/static/v3/js/htmx-sse.js @@ -1,3 +1,4 @@ +/* global htmx */ /* Server Sent Events Extension ============================ diff --git a/web_interface/static/v3/js/utils/error_handler.js b/web_interface/static/v3/js/utils/error_handler.js index d6f297f3..73794741 100644 --- a/web_interface/static/v3/js/utils/error_handler.js +++ b/web_interface/static/v3/js/utils/error_handler.js @@ -1,6 +1,7 @@ +/* global showNotification */ /** * Frontend error handling utilities. - * + * * Provides user-friendly error formatting and display with enhanced UI. */ diff --git a/web_interface/static/v3/js/widgets/array-table.js b/web_interface/static/v3/js/widgets/array-table.js index 9297c5c3..d0fcf617 100644 --- a/web_interface/static/v3/js/widgets/array-table.js +++ b/web_interface/static/v3/js/widgets/array-table.js @@ -179,7 +179,7 @@ const removeButton = document.createElement('button'); removeButton.type = 'button'; removeButton.className = 'text-red-600 hover:text-red-800 px-2 py-1'; - removeButton.onclick = function() { removeArrayTableRow(this); }; + removeButton.onclick = function() { window.removeArrayTableRow(this); }; const removeIcon = document.createElement('i'); removeIcon.className = 'fas fa-trash'; removeButton.appendChild(removeIcon); diff --git a/web_interface/static/v3/js/widgets/checkbox-group.js b/web_interface/static/v3/js/widgets/checkbox-group.js index 837b3590..cbf02ad4 100644 --- a/web_interface/static/v3/js/widgets/checkbox-group.js +++ b/web_interface/static/v3/js/widgets/checkbox-group.js @@ -75,7 +75,7 @@ }); // Update hidden input - updateCheckboxGroupData(fieldId); + window.updateCheckboxGroupData(fieldId); }, handlers: { diff --git a/web_interface/static/v3/js/widgets/custom-feeds.js b/web_interface/static/v3/js/widgets/custom-feeds.js index 1cd4b063..d37ec62c 100644 --- a/web_interface/static/v3/js/widgets/custom-feeds.js +++ b/web_interface/static/v3/js/widgets/custom-feeds.js @@ -142,7 +142,7 @@ fileInput.dataset.index = String(index); fileInput.addEventListener('change', function(e) { const idx = parseInt(e.target.dataset.index || '0', 10); - handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); + window.handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); }); const uploadButton = document.createElement('button'); @@ -207,7 +207,7 @@ removeButton.type = 'button'; removeButton.className = 'text-red-600 hover:text-red-800 px-2 py-1'; removeButton.addEventListener('click', function() { - removeCustomFeedRow(this); + window.removeCustomFeedRow(this); }); const removeIcon = document.createElement('i'); removeIcon.className = 'fas fa-trash'; @@ -290,7 +290,7 @@ fileInput.dataset.index = String(newIndex); fileInput.addEventListener('change', function(e) { const idx = parseInt(e.target.dataset.index || '0', 10); - handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); + window.handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); }); const uploadButton = document.createElement('button'); @@ -449,7 +449,7 @@ fileInput.dataset.index = String(index); fileInput.addEventListener('change', function(e) { const idx = parseInt(e.target.dataset.index || '0', 10); - handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); + window.handleCustomFeedLogoUpload(e, fieldId, idx, pluginId, fullKey); }); // Create upload button