Skip to content
Snippets Groups Projects
Commit b642da07 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

Sak 416

parent 2d87c7c1
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
let match = item[0] let match = item[0]
let hit = {q: q, match: match, label: match, time: time} 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] hit.lang = item[1]
hits.push(hit) hits.push(hit)
......
...@@ -219,10 +219,13 @@ export default { ...@@ -219,10 +219,13 @@ export default {
this.$router.push(source) this.$router.push(source)
let unwrapped = [] let unwrapped = []
for (const d in event.article_ids) { for (const d in event.article_ids) {
event.article_ids[d].forEach(i => unwrapped.push({ if (d == this.lang || this.lang == "bob,nob") {
dictionary: d, event.article_ids[d].forEach(i => unwrapped.push({
id: i dictionary: d,
})) id: i
}))
}
} }
let self = this let self = this
...@@ -265,9 +268,6 @@ export default { ...@@ -265,9 +268,6 @@ export default {
error: self.error error: self.error
}, '') }, '')
}) })
} else { } else {
this.waiting_for_articles = true this.waiting_for_articles = true
this.article = null this.article = null
...@@ -282,11 +282,10 @@ export default { ...@@ -282,11 +282,10 @@ export default {
} }
}, },
update_lang_form: function (event) { update_lang_form: function (event) {
if (this.event) { this.lang = event
if (this.event && !this.article) {
this.event.articles = null this.event.articles = null
this.select_result(this.event) 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) { article_link_click: function(item) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment