Skip to content

Commit

Permalink
#468 source_id now visible to app.vue ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrflood committed Aug 24, 2018
1 parent 02674fd commit a12a94c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/javascript/vue/tasks/nomenclature/by_source/app.vue
Expand Up @@ -8,7 +8,7 @@
legend="Loading..."
:logo-size="{ width: '100px', height: '100px'}"/>
<nomen-source
@source_id="sourceID = $event" />
@sourceID="sourceID = $event" />
</div>
<div class="flexbox">
<div class="flexbox">
Expand Down Expand Up @@ -52,7 +52,7 @@
},
data() {
return {
source_id: undefined,
sourceID: undefined,
isLoading: false,
state: false
}
Expand Down
Expand Up @@ -20,18 +20,18 @@
sourceID: undefined
}
},
methods: {
getSource() {
let pieces = window.location.href.split('/')
this.sourceID = pieces[pieces.length - 1];
if (this.sourceID) {
this.$http.get('/sources/' + this.sourceID + '.json').then(response => {
this.sourceText = response.body.id + ': "' + response.body.cached + '"';
this.$emit('source_id', this.sourceID);
})
}
methods: {
getSource() {
let pieces = window.location.href.split('/')
this.sourceID = pieces[pieces.length - 1];
if (this.sourceID) {
this.$http.get('/sources/' + this.sourceID + '.json').then(response => {
this.sourceText = response.body.id + ': "' + response.body.cached + '"';
this.$emit('sourceID', this.sourceID);
})
}
}
}
,
mounted: function () {
this.getSource()
Expand Down
Expand Up @@ -2,4 +2,22 @@
<div>
<h3>Taxon Names</h3>
</div>
</template>
</template>
<script>
export default {
props: {
value: {
},
source_id: {
type: Integer,
default: 0
},
},
data() {
return {
taxon_names_list: []
}
}
}
</script>

0 comments on commit a12a94c

Please sign in to comment.