From 2ef78e1735ef948e5cfd88e563b833c340180abe Mon Sep 17 00:00:00 2001 From: Anthony Sena Date: Tue, 26 Nov 2024 09:55:36 -0500 Subject: [PATCH] Allow read-only custom feature browsing (#2975) --- js/components/multi-select.html | 4 +- js/components/multi-select.js | 1 + .../fa-view-edit/fa-design.html | 79 ++++++++++--------- .../feature-analysis-view-edit.html | 2 +- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/js/components/multi-select.html b/js/components/multi-select.html index d2f6a68de..cbdd6d990 100644 --- a/js/components/multi-select.html +++ b/js/components/multi-select.html @@ -1,8 +1,8 @@
- + - +
\ No newline at end of file diff --git a/js/components/multi-select.js b/js/components/multi-select.js index 389a204a3..62b39a860 100644 --- a/js/components/multi-select.js +++ b/js/components/multi-select.js @@ -14,6 +14,7 @@ define( self.multiple = params.multiple; self.options = params.options; + self.disable = (params.disable || false); self.selectedValues = ko.observableArray(params.selectedValues && params.selectedValues()); self.selectedValue = params.selectedValue; self.selectedTextFormat = params.selectedTextFormat || 'count > 2'; diff --git a/js/pages/characterizations/components/feature-analyses/fa-view-edit/fa-design.html b/js/pages/characterizations/components/feature-analyses/fa-view-edit/fa-design.html index c8737eb7c..c0a308f82 100644 --- a/js/pages/characterizations/components/feature-analyses/fa-view-edit/fa-design.html +++ b/js/pages/characterizations/components/feature-analyses/fa-view-edit/fa-design.html @@ -16,13 +16,13 @@ -
+
@@ -32,6 +32,7 @@ data-bind=" if: $component.canEdit() || $component.data().type() === $component.featureTypes.PRESET, css: classes({ element: 'nav-pill', extra: $component.data().type() === $component.featureTypes.PRESET ? 'active' : null }), + attr: { disabled: $component.canEdit() ? null : true }, click: setType.bind(null, $component.featureTypes.PRESET) "> @@ -44,6 +45,7 @@ data-bind=" if: ($component.canEdit() && !$component.featureId()) || $component.data().type() === $component.featureTypes.CRITERIA_SET, css: classes({ element: 'nav-pill', extra: $component.data().type() === $component.featureTypes.CRITERIA_SET ? 'active' : null }), + attr: { disabled: $component.canEdit() ? null : true }, click: setType.bind(null, $component.featureTypes.CRITERIA_SET) "> @@ -52,6 +54,7 @@ data-bind=" if: ($component.canEdit() && !$component.featureId()) || $component.data().type() === $component.featureTypes.CUSTOM_FE, css: classes({ element: 'nav-pill', extra: $component.data().type() === $component.featureTypes.CUSTOM_FE ? 'active' : null }), + attr: { disabled: $component.canEdit() ? null : true }, click: setType.bind(null, $component.featureTypes.CUSTOM_FE) "> @@ -63,27 +66,27 @@
- + - +
-
-
- - -
- -
- -
-
- -
-
- -
-
- -
+
+
+
+ + +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
@@ -146,7 +151,7 @@ SELECT covariate_id, covariate_name, concept_id, sum_value, average_value FROM ( ) diff --git a/js/pages/characterizations/components/feature-analyses/feature-analysis-view-edit.html b/js/pages/characterizations/components/feature-analyses/feature-analysis-view-edit.html index 85d579285..f3872bed6 100644 --- a/js/pages/characterizations/components/feature-analyses/feature-analysis-view-edit.html +++ b/js/pages/characterizations/components/feature-analyses/feature-analysis-view-edit.html @@ -38,7 +38,7 @@
-