Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Open-Data
ckanext-odsh
Commits
e118e4c7
Commit
e118e4c7
authored
6 years ago
by
Dennis
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
1a95d854
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckanext/odsh/fanstatic/autocomplete.js
+5
-4
5 additions, 4 deletions
ckanext/odsh/fanstatic/autocomplete.js
ckanext/odsh/logic/action.py
+1
-1
1 addition, 1 deletion
ckanext/odsh/logic/action.py
with
6 additions
and
5 deletions
ckanext/odsh/fanstatic/autocomplete.js
+
5
−
4
View file @
e118e4c7
...
@@ -4,6 +4,9 @@ $(function () {
...
@@ -4,6 +4,9 @@ $(function () {
// Activate search suggestions for the search bar in the header and for the
// Activate search suggestions for the search bar in the header and for the
// search bar used in the body.
// search bar used in the body.
})
$
(
'
.site-search input, .search
'
).
autocomplete
({
$
(
'
.site-search input, .search
'
).
autocomplete
({
delay
:
500
,
delay
:
500
,
html
:
true
,
html
:
true
,
...
@@ -13,9 +16,7 @@ $(function () {
...
@@ -13,9 +16,7 @@ $(function () {
$
.
getJSON
(
url
,
{
q
:
request
.
term
})
$
.
getJSON
(
url
,
{
q
:
request
.
term
})
.
done
(
function
(
data
)
{
.
done
(
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
response
(
data
);
response
(
data
.
result
.
spellcheck
.
suggestions
[
1
].
suggestion
);
});
});
}
}
});
});
\ No newline at end of file
})
This diff is collapsed.
Click to expand it.
ckanext/odsh/logic/action.py
+
1
−
1
View file @
e118e4c7
...
@@ -53,5 +53,5 @@ def autocomplete(context, data_dict):
...
@@ -53,5 +53,5 @@ def autocomplete(context, data_dict):
raise
SearchError
(
'
SOLR returned an error running query: %r Error: %r
'
%
raise
SearchError
(
'
SOLR returned an error running query: %r Error: %r
'
%
(
query
,
e
))
(
query
,
e
))
suggest
=
solr_response
.
raw_response
.
get
(
'
spellcheck
'
)
suggest
=
solr_response
.
raw_response
return
suggest
return
suggest
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