airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 17/28: AIRAVATA-2876 Update app inputs array when order changed
Date Tue, 11 Sep 2018 17:12:05 GMT
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

commit 704dcfdbf4011cd68af46838c998cc9882df5032
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed Sep 5 12:09:43 2018 -0400

    AIRAVATA-2876 Update app inputs array when order changed
---
 .../components/applications/ApplicationInterfaceEditor.vue   | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
index 8d2789c..891b105 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
@@ -26,8 +26,10 @@
         <h1 class="h5 mb-4">
           Input Fields
         </h1>
-        <draggable v-model="data.applicationInputs" :options="dragOptions" @start="onDragStart"
@end="onDragEnd">
-          <application-input-field-editor v-for="(input, index) in data.applicationInputs"
:value="input" :key="index" :id="'app-input-'+index" :focus="index === focusApplicationInputIndex"
:collapse="collapseApplicationInputs" @input="updatedInput($event, index)" @delete="deleteInput($event,
index)" />
+        <draggable v-model="data.applicationInputs" :options="dragOptions" @start="onDragStart"
@end="onDragEnd" @input="emitChanged">
+          <application-input-field-editor v-for="(input, index) in data.applicationInputs"
:value="input" :key="index" :id="'app-input-'+index"
+            :focus="index === focusApplicationInputIndex" :collapse="collapseApplicationInputs"
@input="updatedInput($event, index)"
+            @delete="deleteInput($event, index)" />
         </draggable>
       </div>
     </div>
@@ -93,7 +95,7 @@ export default {
     },
     updatedInput(newValue, index) {
       Object.assign(this.data.applicationInputs[index], newValue);
-      this.$emit("input", this.data);
+      this.emitChanged();
     },
     addApplicationInput() {
       this.data.applicationInputs.push(new models.InputDataObjectType());
@@ -107,8 +109,10 @@ export default {
     },
     onDragEnd() {
       this.collapseApplicationInputs = false;
+    },
+    emitChanged() {
+      this.$emit("input", this.data);
     }
   }
 };
 </script>
-


Mime
View raw message