Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Margunn.Rauset
beta.ordbok.uib.no
Commits
3dc79532
Commit
3dc79532
authored
5 years ago
by
Ole Voldsæter
Browse files
Options
Downloads
Patches
Plain Diff
viser spinner mens data lastes
parent
d04ebbfe
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.vue
+15
-0
15 additions, 0 deletions
src/App.vue
src/assets/spinner.gif
+0
-0
0 additions, 0 deletions
src/assets/spinner.gif
with
15 additions
and
0 deletions
src/App.vue
+
15
−
0
View file @
3dc79532
...
...
@@ -11,6 +11,7 @@
<input
type=
"submit"
name=
""
value=
"Yay!"
>
</form>
</div>
<img
id=
"spinner"
:class=
"waiting ? 'show' : 'hide'"
src=
"./assets/spinner.gif"
alt=
""
/>
<SearchResults
:hits=
"search_results"
:lang=
"query_lang"
/>
<Article
:article=
"article"
/>
</div>
...
...
@@ -36,6 +37,7 @@ export default {
query_lang
:
params
.
get
(
'
lang
'
),
path_lang
:
path
.
pop
(),
search_results
:
[],
waiting
:
true
,
article
:
{
lemmas
:
[],
body
:{
pronunciation
:
[],
definitions
:
[],
etymology
:
[]}},
/*search: function(q) {
return new Promise(resolve => {
...
...
@@ -85,6 +87,7 @@ export default {
axios
.
get
(
api_endpoint
+
self
.
query_lang
+
'
/article
'
+
'
?expand_lemmas=true&lemma_text=
'
+
self
.
search_query
)
.
then
(
function
(
response
){
self
.
search_results
=
response
.
data
self
.
waiting
=
false
})
}
else
if
(
this
.
article_id
)
...
...
@@ -92,8 +95,12 @@ export default {
axios
.
get
(
api_endpoint
+
self
.
path_lang
+
'
/article
'
+
'
/
'
+
self
.
article_id
+
'
?expand_lemmas=true&expand_refs=true
'
)
.
then
(
function
(
response
){
self
.
article
=
response
.
data
self
.
waiting
=
false
})
}
else
{
this
.
waiting
=
false
}
}
}
</
script
>
...
...
@@ -109,6 +116,14 @@ export default {
margin-right
:
10%
;
}
.show
{
display
:
block
;
}
.hide
{
display
:
none
;
}
.autocomplete
{
width
:
25em
;
}
...
...
This diff is collapsed.
Click to expand it.
src/assets/spinner.gif
0 → 100644
+
0
−
0
View file @
3dc79532
14.4 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment