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

Merge branch 'dev' into 'prod'

Dev

See merge request spraksamlingane/beta.ordbok.uib.no!86
parents 9286fbae bd74da6f
No related branches found
Tags release_2021-10-19
No related merge requests found
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
rounded rounded
clearable clearable
hide-no-data hide-no-data
autofocus
auto-select-first auto-select-first
no-filter no-filter
hide-details hide-details
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
<span class="search-hit"> <span class="search-hit">
{{data.item.label}} {{data.item.label}}
</span> </span>
({{{"b": "bm", "n": "nn", "bn": "bm, nn" }[data.item.lang] || ["søker...","ingen treff","avansert søk"][data.item.search]}}) <span v-if="get_lang()=='bob,nob'">({{{"b": "bm", "n": "nn", "bn": "bm, nn" }[data.item.lang] || ["søker...","ingen treff","avansert søk"][data.item.search]}})</span>
</template> </template>
<template slot="no-data"> <template slot="no-data">
<div></div> <div></div>
...@@ -75,6 +76,9 @@ ...@@ -75,6 +76,9 @@
} }
}, },
methods: { methods: {
get_lang() {
return this.$parent.lang
},
run_query(q, time) { run_query(q, time) {
this.suggesting = true this.suggesting = true
// Search options while waiting for response // Search options while waiting for response
...@@ -92,7 +96,7 @@ ...@@ -92,7 +96,7 @@
this.items.push({q: q, label: q, time: time, search: search}) this.items.push({q: q, label: q, time: time, search: search})
} }
let self = this let self = this
self.api.get('suggest?', {params: {q: q, dict: self.$parent.lang, n: 80, scope: 'w', stage: self.$parent.stage}}) self.api.get('suggest?', {params: {q: q, dict: self.get_lang(), n: 80, scope: 'w', stage: self.$parent.stage}})
.then(async (response) => { .then(async (response) => {
if (self.$refs.autocomplete.searchInput == q & self.suggesting) { if (self.$refs.autocomplete.searchInput == q & self.suggesting) {
......
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