This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/master by this push:
new d187d26 AIRAVATA-3021 Toggle input properties when hidden/shown
d187d26 is described below
commit d187d26e89705a18b3433b3bea2391da82530e6a
Author: Marcus Christie <[email protected]>
AuthorDate: Tue Apr 16 12:40:25 2019 -0400
AIRAVATA-3021 Toggle input properties when hidden/shown
---
.../django_airavata_api/js/models/InputDataObjectType.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git
a/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
b/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
index 87c85f0..bb13519 100644
---
a/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
+++
b/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
@@ -162,6 +162,13 @@ export default class InputDataObjectType extends BaseModel
{
* ... additional boolean expressions ("AND", "OR", "NOT")
* ... additional application input comparisons
* ]
+ * },
+ * "showOptions": { // Optional
+ * "toggle": [
+ * "requiredToAddedToCommandLine", // Names of properties on this
application
+ * // input to toggle when show
changes
+ * ...
+ * ]
* }
* }
* }
@@ -226,6 +233,13 @@ export default class InputDataObjectType extends BaseModel
{
this.show = booleanExpressionEvaluator.evaluate(
this.editorDependencies.show
);
+ if ("showOptions" in this.editorDependencies) {
+ if ("toggle" in this.editorDependencies.showOptions) {
+ this.editorDependencies.showOptions.toggle.forEach(prop => {
+ this[prop] = this.show;
+ });
+ }
+ }
}
}
}