From 466b427367854d03ff2ac5dd492d7c3de70b2f45 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 7 Jun 2023 18:02:17 +0200 Subject: [PATCH 1/5] fixed readonly which was missing and made readonly ccpimage fields --- ccp/js/inputwidgeteditorcontroller.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index d0f7c10..5c534c7 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -72,20 +72,20 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
- +
- @@ -94,13 +94,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
- +
@@ -108,7 +108,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
- @@ -122,7 +122,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
- + +
+
+
+ +
+
@@ -195,6 +201,9 @@ class CCPInputWidgetEditorController extends HTMLElement{ else if(ename === "default"){ this.#input.schema.default = val } + else if(ename === "readonly"){ + this.#input.schema.readOnly = ev.target.checked + } else if(ename === "type"){ this.#type = ev.target.value if(this.#type === "enum"){ From 63d6d57956887273ae0c44176bf40bd1c57c8d73 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 7 Jun 2023 18:06:19 +0200 Subject: [PATCH 2/5] fixed readonly which was missing and made readonly ccpimage fields --- ccp/js/inputwidgeteditorcontroller.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index 5c534c7..75ff00f 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -72,20 +72,20 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
- +
- @@ -94,13 +94,13 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
- +
@@ -108,7 +108,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
- @@ -122,7 +122,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
From 03c415df2c9e76c34270601a475eb9b136c3a57d Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 7 Jun 2023 18:08:28 +0200 Subject: [PATCH 3/5] fixed readonly which was missing and made readonly ccpimage fields --- ccp/js/inputwidgeteditorcontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index 75ff00f..1ce6d9b 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -65,7 +65,7 @@ class CCPInputWidgetEditorController extends HTMLElement{ this.innerHTML = `
- + ${ input.id !== 'ccpimage' ? this.renderDeleteButton() : ''}
From e4b5ae496b116c9080d99d5b3da51c15855dfb8c Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 7 Jun 2023 18:14:03 +0200 Subject: [PATCH 4/5] fixed readonly which was missing and made readonly ccpimage fields --- ccp/js/inputwidgeteditorcontroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccp/js/inputwidgeteditorcontroller.js b/ccp/js/inputwidgeteditorcontroller.js index 1ce6d9b..6ded546 100644 --- a/ccp/js/inputwidgeteditorcontroller.js +++ b/ccp/js/inputwidgeteditorcontroller.js @@ -128,7 +128,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
- +
From 20ac50bc226274362532411e9fd312bd659692e7 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Wed, 7 Jun 2023 18:20:55 +0200 Subject: [PATCH 5/5] added accessor for readonly --- ccp/js/inputwidgetcontroller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ccp/js/inputwidgetcontroller.js b/ccp/js/inputwidgetcontroller.js index 996814c..1aedbc2 100644 --- a/ccp/js/inputwidgetcontroller.js +++ b/ccp/js/inputwidgetcontroller.js @@ -64,6 +64,10 @@ class Renderer{ get required(){ return this.#input.minOccurs > 0 } + + get readOnly(){ + return this.#input.schema.readOnly + } static instance(input){ if(this.isEnum(input)){