Commit ce831d1f authored by Henrik Askjer's avatar Henrik Askjer
Browse files

Merge branch 'hotfix-dict-as-int' into 'prod'

use int dform

See merge request spraksamlingane/beta.ordbok.uib.no!96
parents 3d644f3d b5bf6e29
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
{{data.item.label}} {{data.item.label}}
</span> </span>
<span v-if="(get_lang()=='bm,nn')"> <span v-if="(get_lang()=='bm,nn')">
({{{"b": "bm", "n": "nn", "bn": "bm, nn" }[data.item.lang] || ({{["bm","nn","bm,nn"][data.item.lang-1] ||
["søker...","ingen treff","avansert søk"][data.item.search]}}) ["søker...","ingen treff","avansert søk"][data.item.search]}})
</span> </span>
</template> </template>
...@@ -99,12 +99,10 @@ ...@@ -99,12 +99,10 @@
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.get_lang(), n: 80, scope: 'w'}}) self.api.get('suggest?', {params: {q: q, dict: self.get_lang(), n: 80, scope: 'w', dform: 'int'}})
.then(async (response) => { .then(async (response) => {
if (self.$refs.autocomplete.searchInput == q & self.suggesting) { if (self.$refs.autocomplete.searchInput == q & self.suggesting) {
let suggestions = response.data.a.w.map(item => ({q: q, match: item[0], label: item[0], time: time, lang: [item[1]]}))
let suggestions = response.data.a.w.map(item => ({q: q, match: item[0], label: item[0], time: time, lang: item[1]}))
if (/[_*%|]/.test(q)) { if (/[_*%|]/.test(q)) {
suggestions.unshift({q: q, label: q, time: time, search: 2}) suggestions.unshift({q: q, label: q, time: time, search: 2})
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment