From 448820a11634de6ec356c77b8c7c0cf4937b344c Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 8 Jan 2022 14:47:39 +0100 Subject: work on UI components This commit introduces some HTML and javascript (and tests for it) to use in constructing the new UI. This is partial work that is not yet finished. --- html/DOM_helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'html/DOM_helpers.js') diff --git a/html/DOM_helpers.js b/html/DOM_helpers.js index 55320cb..88092e5 100644 --- a/html/DOM_helpers.js +++ b/html/DOM_helpers.js @@ -70,7 +70,7 @@ function clone_template(template_id) while (to_process.length > 0) { const element = to_process.pop(); - const template_key = element.getAttribute("data-template"); + let template_key = element.getAttribute("data-template") || element.id; if (template_key) result_object[template_key] = element; -- cgit v1.2.3