You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/11/15 16:13:23 UTC
[airavata-django-portal] 10/10: AIRAVATA-2711 Removing
Autocomplete.vue component
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 1d847ad36f1b03249cda9b13c3bacb02c1559813
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Thu Nov 15 11:12:48 2018 -0500
AIRAVATA-2711 Removing Autocomplete.vue component
---
.../static/common/js/components/Autocomplete.vue | 61 ----------------------
django_airavata/static/common/js/index.js | 2 -
2 files changed, 63 deletions(-)
diff --git a/django_airavata/static/common/js/components/Autocomplete.vue b/django_airavata/static/common/js/components/Autocomplete.vue
deleted file mode 100644
index 8648177..0000000
--- a/django_airavata/static/common/js/components/Autocomplete.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-<template>
- <div style="position:relative">
- <span class="selected-cards" style="position:relative">
- <b-button variant="warning" v-for="item in selected" v-bind:key="item.id" @click="removeClick(item)">
- {{ item.name }} <b-badge variant="light"><a href="#">x</a></b-badge>
- </b-button>
- </span>
- <hr>
- <autocomplete-text-input :suggestions="suggestions" @selected="suggestionSelected" />
- </div>
-</template>
-
-<script>
-import AutocompleteTextInput from "./AutocompleteTextInput.vue";
-import VModelMixin from "../mixins/VModelMixin";
-
-export default {
- name: "autocomplete",
- mixins: [VModelMixin],
- props: {
- value: {
- type: Array
- },
-
- suggestions: {
- type: Array,
- required: true
- }
- },
- components: {
- AutocompleteTextInput
- },
- computed: {
- selected() {
- return this.suggestions.filter(suggestion => {
- return this.data.indexOf(suggestion.id) >= 0;
- });
- }
- },
- methods: {
- suggestionSelected(suggestion) {
- if (this.data.indexOf(suggestion.id) == -1) {
- this.data.push(suggestion.id);
- }
- },
- removeClick(data) {
- var index = this.data.indexOf(data.id);
- this.data.splice(index, 1);
- }
- }
-};
-</script>
-<style>
-.selected-cards > button {
- margin-bottom: 10px;
- margin-right: 10px;
-}
-.selected-cards > button:last-child {
- margin-right: 0px;
-}
-</style>
diff --git a/django_airavata/static/common/js/index.js b/django_airavata/static/common/js/index.js
index 2cd1d48..eb66c54 100644
--- a/django_airavata/static/common/js/index.js
+++ b/django_airavata/static/common/js/index.js
@@ -1,5 +1,4 @@
import ApplicationCard from "./components/ApplicationCard.vue";
-import Autocomplete from "./components/Autocomplete.vue";
import AutocompleteTextInput from "./components/AutocompleteTextInput.vue";
import ConfirmationDialog from "./components/ConfirmationDialog.vue";
import DeleteButton from "./components/DeleteButton.vue";
@@ -24,7 +23,6 @@ import * as utils from "./utils";
exports.components = {
Pager,
ApplicationCard,
- Autocomplete,
AutocompleteTextInput,
ConfirmationDialog,
DeleteButton,