diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue index 1ac5facb424a4edd257f7424d93ff927d0fdef82..c7a588ff2d3b5e0cbf3609e2492ce6cdb1543a33 100644 --- a/src/components/Autocomplete.vue +++ b/src/components/Autocomplete.vue @@ -103,7 +103,7 @@ let match = item[0] let hit = {q: q, match: match, label: match, time: time} - hit.article_promise = self.api.get('articles?', {params: {lord: match, dict: self.$parent.lang}}) + hit.article_promise = self.api.get('articles?', {params: {lord: match}}) hit.lang = item[1] hits.push(hit) diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index d4e73abdf2711e898dc0316f9ab341d38d1da17a..916799ec06da8b99f29dcccb03eb48ee06a9b2d1 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -219,10 +219,13 @@ export default { this.$router.push(source) let unwrapped = [] for (const d in event.article_ids) { - event.article_ids[d].forEach(i => unwrapped.push({ - dictionary: d, - id: i - })) + if (d == this.lang || this.lang == "bob,nob") { + event.article_ids[d].forEach(i => unwrapped.push({ + dictionary: d, + id: i + })) + } + } let self = this @@ -265,9 +268,6 @@ export default { error: self.error }, '') }) - - - } else { this.waiting_for_articles = true this.article = null @@ -282,11 +282,10 @@ export default { } }, update_lang_form: function (event) { - if (this.event) { + this.lang = event + if (this.event && !this.article) { this.event.articles = null this.select_result(this.event) - } else { - navigate_to_search(this, this.$router.history.current.params.word || this.$router.history.current.params.query) } }, article_link_click: function(item) {