From b1b0a4e43365b36cac23688c4db402e46e0b224a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 22 Sep 2011 14:44:46 +0200 Subject: Correct route shifting in edition (closes #304) + enlarge the edition map (closes #305) --- chimere/locale/fr/LC_MESSAGES/django.po | 14 +++++++++--- chimere/main/widgets.py | 17 ++++++++++---- chimere/static/edit_route_map.js | 25 ++++++++++++++++----- chimere/static/forms.css | 40 +++++++++++++++++++++++++++------ chimere/templates/upload_file.html | 1 + 5 files changed, 78 insertions(+), 19 deletions(-) diff --git a/chimere/locale/fr/LC_MESSAGES/django.po b/chimere/locale/fr/LC_MESSAGES/django.po index ec34c01..16a1d6c 100644 --- a/chimere/locale/fr/LC_MESSAGES/django.po +++ b/chimere/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-16 11:59+0200\n" +"POT-Creation-Date: 2011-09-22 14:35+0200\n" "PO-Revision-Date: 2010-03-20 20:00+0100\n" "Last-Translator: Étienne Loks \n" "MIME-Version: 1.0\n" @@ -384,7 +384,15 @@ msgstr "ou" msgid "Start \"hand\" drawing" msgstr "Commencer le tracé manuellement" -#: main/widgets.py:334 +#: main/widgets.py:205 +msgid "Move on the map" +msgstr "Se déplacer" + +#: main/widgets.py:205 +msgid "Draw" +msgstr "Tracer" + +#: main/widgets.py:343 msgid "Select..." msgstr "Sélectionner..." @@ -557,7 +565,7 @@ msgstr "Merci pour votre proposition !" msgid "Upload a file" msgstr "Déposer un fichier" -#: templates/upload_file.html:50 +#: templates/upload_file.html:51 msgid "Upload" msgstr "Déposer" diff --git a/chimere/main/widgets.py b/chimere/main/widgets.py index 74fc022..65223e8 100644 --- a/chimere/main/widgets.py +++ b/chimere/main/widgets.py @@ -189,13 +189,20 @@ the desired position")) _(u"Upload a route file (GPX or KML)")) tpl += u"""\n

%s

\n""" % _(u"or") tpl += u"""
+onclick='toggleDraw();'> %s

""" % (_(u"Start \"hand\" drawing")) - tpl += """ + if value: + tpl += """
""" - if not value: + else: + tpl += """ +
+
+ %s + %s
+
""" % (_(u"Move on the map"), _(u"Draw")) tpl += '''
%s
''' % help_create style = '' @@ -209,8 +216,10 @@ class='toggle-button' onclick='toggleDrawOn();'> value="%s"/> """ % (style, help_modify, name, name, value, routefile_id) tpl += "