forked from Archives/searxng
Merge pull request #241 from Cqoicebordel/Remove-whitespace
Remove whitespace and allow autocompleter to work in sub folders
This commit is contained in:
commit
73e9a35851
@ -1,6 +1,6 @@
|
|||||||
if(searx.autocompleter) {
|
if(searx.autocompleter) {
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
new Autocompleter.Request.JSON('q', '/autocompleter', {
|
new Autocompleter.Request.JSON('q', './autocompleter', {
|
||||||
postVar:'q',
|
postVar:'q',
|
||||||
postData:{
|
postData:{
|
||||||
'format': 'json'
|
'format': 'json'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
if(searx.autocompleter) {
|
if(searx.autocompleter) {
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
new Autocompleter.Request.JSON('q', '/autocompleter', {
|
new Autocompleter.Request.JSON('q', './autocompleter', {
|
||||||
postVar:'q',
|
postVar:'q',
|
||||||
postData:{
|
postData:{
|
||||||
'format': 'json'
|
'format': 'json'
|
||||||
|
BIN
searx/static/themes/oscar/js/searx.min.js
vendored
BIN
searx/static/themes/oscar/js/searx.min.js
vendored
Binary file not shown.
@ -19,7 +19,7 @@ if(searx.autocompleter) {
|
|||||||
searx.searchResults = new Bloodhound({
|
searx.searchResults = new Bloodhound({
|
||||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
|
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
|
||||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||||
remote: '/autocompleter?q=%QUERY'
|
remote: './autocompleter?q=%QUERY'
|
||||||
});
|
});
|
||||||
searx.searchResults.initialize();
|
searx.searchResults.initialize();
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% include 'oscar/navbar.html' %}
|
{% include 'oscar/navbar.html' %}
|
||||||
|
|
||||||
{% block site_alert_error %}
|
{% block site_alert_error %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block site_alert_warning %}
|
{% block site_alert_warning %}
|
||||||
@ -62,7 +62,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block site_alert_success %}
|
{% block site_alert_success %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -81,6 +81,8 @@ app = Flask(
|
|||||||
template_folder=templates_path
|
template_folder=templates_path
|
||||||
)
|
)
|
||||||
|
|
||||||
|
app.jinja_env.trim_blocks = True
|
||||||
|
app.jinja_env.lstrip_blocks = True
|
||||||
app.secret_key = settings['server']['secret_key']
|
app.secret_key = settings['server']['secret_key']
|
||||||
|
|
||||||
babel = Babel(app)
|
babel = Babel(app)
|
||||||
|
Loading…
Reference in New Issue
Block a user