From 5e88cd90f59e7c5c36baafbaf69710ad0173b1ed Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 6 Oct 2023 11:41:32 +0200 Subject: [PATCH 1/4] add tooltip for items --- storage/d4s-storage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/d4s-storage.js b/storage/d4s-storage.js index 65432c3..301ecf1 100644 --- a/storage/d4s-storage.js +++ b/storage/d4s-storage.js @@ -432,6 +432,7 @@ class D4SStorageTree extends D4SStorageHtmlElement { li.setAttribute(D4SStorageTree.dataname_attr, label); li.setAttribute(D4SStorageTree.dataid_attr, id); li.style.userSelect = "none" + li.title = li.alt = label if (parentId) { li.setAttribute(D4SStorageTree.parentid_attr, parentId); } From 4863b992f23846cf4ca5c5300d57db48cd89778b Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 6 Oct 2023 16:18:57 +0200 Subject: [PATCH 2/4] removed dead code --- storage/d4s-storage.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/storage/d4s-storage.js b/storage/d4s-storage.js index 301ecf1..deb869d 100644 --- a/storage/d4s-storage.js +++ b/storage/d4s-storage.js @@ -263,8 +263,6 @@ class D4SStorageTree extends D4SStorageHtmlElement { this.addEventListener(D4SStorageTree.folder_data_event_name, this.folderDataEventHandler); if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", this.registerOtherListeners.bind(this)); - } else { - this.registerListeners(); } } @@ -603,8 +601,6 @@ class D4SStorageFolder extends D4SStorageHtmlElement { if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", this.registerOtherListeners.bind(this)); - } else { - this.registerListeners(); } } From d354e27b8d4364e8d9c7e68c232dffcedf4e5173 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 6 Oct 2023 16:19:37 +0200 Subject: [PATCH 3/4] removed visual clutch --- ccp/js/executionformcontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 246decb..55d783e 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -78,7 +78,7 @@ class CCPExecutionForm extends HTMLElement{
- +
From 6911ba7c9d20ee3501a7eea68e1bc3a98e8284bb Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 6 Oct 2023 16:19:54 +0200 Subject: [PATCH 4/4] added support for remote files from d4s workspace --- ccp/js/inputwidgetcontroller.js | 126 ++++++++++++++++++++++++-- ccp/js/inputwidgeteditorcontroller.js | 1 + 2 files changed, 118 insertions(+), 9 deletions(-) diff --git a/ccp/js/inputwidgetcontroller.js b/ccp/js/inputwidgetcontroller.js index 08dd748..ca1ae68 100644 --- a/ccp/js/inputwidgetcontroller.js +++ b/ccp/js/inputwidgetcontroller.js @@ -29,6 +29,9 @@ class CCPInputWidgetController extends HTMLElement { }else if(this.isFile()){ this.innerHTML += `` + }else if(this.isRemoteFile()){ + this.innerHTML += `` + }else if(this.isSecret()){ this.innerHTML += `` @@ -80,6 +83,13 @@ class CCPInputWidgetController extends HTMLElement { (this.#data.schema.format.toLowerCase() === "file") } + isRemoteFile(){ + return (this.#data.schema.type === "string") && + ("format" in this.#data.schema) && + (this.#data.schema.format != null) && + (this.#data.schema.format.toLowerCase() === "remotefile") + } + isDateTime(){ return (this.#data.schema.type === "string") && ("format" in this.#data.schema) && @@ -196,30 +206,52 @@ class CCPBaseInputWidgetController extends HTMLElement{ return this.#type } + renderPlusMinus(){ + this.rootdoc.querySelector("div[name=plusminus]").innerHTML = ` + ${this.isIncrementable() ? `+` : ``} + ${this.isDecrementable() ? `-` : ``} + ` + } + + renderContent(){ + this.rootdoc.querySelector("div[name=content]").innerHTML = this.content() + } + render(){ this.rootdoc.innerHTML = `