Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Språksamlingane
beta.ordbok.uib.no
Commits
ce831d1f
Commit
ce831d1f
authored
Nov 18, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/Autocomplete.vue
View file @
ce831d1f
...
...
@@ -32,7 +32,7 @@
{{
data
.
item
.
label
}}
</span>
<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
]
}}
)
</span>
</
template
>
...
...
@@ -99,12 +99,10 @@
this
.
items
.
push
({
q
:
q
,
label
:
q
,
time
:
time
,
search
:
search
})
}
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
)
=>
{
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
))
{
suggestions
.
unshift
({
q
:
q
,
label
:
q
,
time
:
time
,
search
:
2
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment