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 8f04f8736c60ad40faaff3c3c0d087bcb4408050 Author: Marcus Christie <[email protected]> AuthorDate: Wed Sep 5 10:25:43 2018 -0400 AIRAVATA-2876 Draggable app input reordering --- django_airavata/apps/admin/package-lock.json | 21 +++++++++++++++++---- django_airavata/apps/admin/package.json | 1 + .../applications/ApplicationInterfaceEditor.vue | 9 +++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/django_airavata/apps/admin/package-lock.json b/django_airavata/apps/admin/package-lock.json index 43b0092..2a80427 100644 --- a/django_airavata/apps/admin/package-lock.json +++ b/django_airavata/apps/admin/package-lock.json @@ -12742,7 +12742,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "requires": { "chardet": "^0.4.0", @@ -14094,7 +14094,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -14972,7 +14972,7 @@ }, "node-fetch": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", "integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=", "requires": { "encoding": "^0.1.11", @@ -15198,7 +15198,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", @@ -18291,6 +18291,11 @@ "is-plain-obj": "^1.0.0" } }, + "sortablejs": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.7.0.tgz", + "integrity": "sha1-gKKyNwq9Vo4c7IwnETHvMKkE+ig=" + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -19141,6 +19146,14 @@ "integrity": "sha512-x3LV3wdmmERhVCYy3quqA57NJW7F3i6faas++pJQWtknWT+n7k30F4TVdHvCLn48peTJFRvCpxs3UuFPqgeELg==", "dev": true }, + "vuedraggable": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.16.0.tgz", + "integrity": "sha512-fr9gcWKXMJlzbbtJcrQs4kU7qdOZqd4SEpAcx+r0nykbW8AygZN0aKVpadEtI53T8A2azhzCdXMvEqrLuKE2fA==", + "requires": { + "sortablejs": "^1.7.0" + } + }, "vuex": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/vuex/-/vuex-2.5.0.tgz", diff --git a/django_airavata/apps/admin/package.json b/django_airavata/apps/admin/package.json index 42b83ad..ccae111 100644 --- a/django_airavata/apps/admin/package.json +++ b/django_airavata/apps/admin/package.json @@ -19,6 +19,7 @@ "vue": "^2.3.3", "vue-resource": "^1.3.4", "vue-router": "^2.7.0", + "vuedraggable": "^2.16.0", "vuex": "^2.4.0" }, "devDependencies": { 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 c49243e..4a880be 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,7 +26,9 @@ <h1 class="h5 mb-4"> Input Fields </h1> - <application-input-field-editor v-for="(input, index) in data.applicationInputs" :value="input" :key="index" :id="'app-input-'+index" :focus="index === focusApplicationInputIndex" @input="updatedInput($event, index)" @delete="deleteInput($event, index)" /> + <draggable v-model="data.applicationInputs"> + <application-input-field-editor v-for="(input, index) in data.applicationInputs" :value="input" :key="index" :id="'app-input-'+index" :focus="index === focusApplicationInputIndex" @input="updatedInput($event, index)" @delete="deleteInput($event, index)" /> + </draggable> </div> </div> <div class="row"> @@ -54,6 +56,8 @@ import { models } from "django-airavata-api"; import vmodel_mixin from "../commons/vmodel_mixin"; import ApplicationInputFieldEditor from "./ApplicationInputFieldEditor.vue"; +import draggable from "vuedraggable"; + export default { name: "application-interface-editor", mixins: [vmodel_mixin], @@ -63,7 +67,8 @@ export default { } }, components: { - ApplicationInputFieldEditor + ApplicationInputFieldEditor, + draggable }, computed: { trueFalseOptions() {
