From d1f157c44e348fccd99a4b09c17350612ec2f8f7 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Mon, 31 Oct 2011 14:36:35 +0100 Subject: [PATCH] Add config for territoria URL. Add "etalage" namespace. --- development.ini | 1 + poiscasse/static/js/poiscasse.js | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/development.ini b/development.ini index 255676a..1aee38a 100644 --- a/development.ini +++ b/development.ini @@ -20,6 +20,7 @@ cache_dir = %(here)s/cache database = souk realm = PoisCasse static_files = true +territoria_url = http://127.0.0.1:8090/ # CSS & JavaScript URLs jquery.js = http://localhost:7000/jquery/jquery-1.6.4.min.js diff --git a/poiscasse/static/js/poiscasse.js b/poiscasse/static/js/poiscasse.js index 1618314..9265e47 100644 --- a/poiscasse/static/js/poiscasse.js +++ b/poiscasse/static/js/poiscasse.js @@ -1,9 +1,36 @@ +/* + * PoisCasse -- Open Data POIs portal + * By: Emmanuel Raviart + * Romain Soufflet + * + * Copyright (C) 2011 Easter-eggs + * http://gitorious.org/infos-pratiques/poiscasse + * + * This file is part of PoisCasse. + * + * PoisCasse is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * PoisCasse is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . +*/ + + +var etalage = etalage || {}; + + $(function () { - territoryAutocompleterUrl = "http://127.0.0.1:5002/api/v1/autocomplete-territory"; $('#territory').autocomplete({ source: function(request, response) { $.ajax({ - url: territoryAutocompleterUrl + '?jsonp=?', + url: etalage.territoryAutocompleterUrl + '?jsonp=?', dataType: 'jsonp', data: { term: request.term -- 2.1.4