Merge pull request #241 from Cqoicebordel/Remove-whitespace

Remove whitespace and allow autocompleter to work in sub folders
This commit is contained in:
Adam Tauber 2015-02-16 15:58:34 +01:00
commit 73e9a35851
6 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,6 @@
if(searx.autocompleter) {
window.addEvent('domready', function() {
new Autocompleter.Request.JSON('q', '/autocompleter', {
new Autocompleter.Request.JSON('q', './autocompleter', {
postVar:'q',
postData:{
'format': 'json'

View file

@ -1,6 +1,6 @@
if(searx.autocompleter) {
window.addEvent('domready', function() {
new Autocompleter.Request.JSON('q', '/autocompleter', {
new Autocompleter.Request.JSON('q', './autocompleter', {
postVar:'q',
postData:{
'format': 'json'

File diff suppressed because one or more lines are too long

View file

@ -19,7 +19,7 @@ if(searx.autocompleter) {
searx.searchResults = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '/autocompleter?q=%QUERY'
remote: './autocompleter?q=%QUERY'
});
searx.searchResults.initialize();
}

View file

@ -46,7 +46,7 @@
<body>
<div class="container">
{% include 'oscar/navbar.html' %}
{% block site_alert_error %}
{% endblock %}
{% block site_alert_warning %}
@ -62,7 +62,7 @@
{% endblock %}
{% block site_alert_success %}
{% endblock %}
{% block content %}
{% endblock %}

View file

@ -81,6 +81,8 @@ app = Flask(
template_folder=templates_path
)
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.secret_key = settings['server']['secret_key']
babel = Babel(app)