From: olivier <> Date: Thu, 6 Mar 2008 19:21:17 +0000 (+0000) Subject: advanced search: add missing templates X-Git-Tag: 1.1~867 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a263a7969f4ad6cebfc1b1025b8a659b8fb850af;p=telemeta.git advanced search: add missing templates --- diff --git a/telemeta/templates/geo_continents.js b/telemeta/templates/geo_continents.js new file mode 100644 index 00000000..4e8c1930 --- /dev/null +++ b/telemeta/templates/geo_continents.js @@ -0,0 +1,25 @@ +{% load telemeta_utils %} + +var countries = [ {% for country in countries %} + ['{{country.0|escapejs}}', '{{country.1|escapejs}}']{% if not forloop.last %},{% endif %} {%endfor%} +]; + +function get_countries(continent) +{ + res = []; + for (var i = 0; i < countries.length; i++) + if ((continent == '') || (countries[i][0] == continent)) + res.push(countries[i][1]); + return res; +} + +function update_countries(continent, countries) +{ + var list = get_countries(continent.value); + countries.options.length = list.length + 1; + countries.options[0] = new Option('All countries', ''); + for (var i = 0; i < list.length; i++) { + countries.options[i+1] = new Option(list[i], list[i]); + } +} + diff --git a/telemeta/templates/search_criteria.html b/telemeta/templates/search_criteria.html new file mode 100644 index 00000000..41689ac0 --- /dev/null +++ b/telemeta/templates/search_criteria.html @@ -0,0 +1,90 @@ +{% extends "base.html" %} +{% load telemeta_utils %} + +{% block extra_javascript %} + +{% endblock %} + +{% block content %} +

Advanced search

+ +
+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ +

+ +
+ +{% endblock %}