diff options
-rw-r--r-- | chimere/locale/fr/LC_MESSAGES/django.po | 37 | ||||
-rw-r--r-- | chimere/main/views.py | 1 | ||||
-rw-r--r-- | chimere/main/widgets.py | 14 | ||||
-rw-r--r-- | chimere/static/edit_route_map.js | 9 | ||||
-rw-r--r-- | chimere/static/forms.css | 40 | ||||
-rw-r--r-- | chimere/static/img/drawing.png | bin | 0 -> 7445 bytes | |||
-rw-r--r-- | chimere/static/img/images_licences (renamed from chimere/static/img/upload_images.licence) | 17 | ||||
-rw-r--r-- | chimere/static/img/upload.png | bin | 8822 -> 8871 bytes | |||
-rw-r--r-- | chimere/static/styles.css | 22 | ||||
-rw-r--r-- | chimere/templates/upload_file.html | 4 |
10 files changed, 83 insertions, 61 deletions
diff --git a/chimere/locale/fr/LC_MESSAGES/django.po b/chimere/locale/fr/LC_MESSAGES/django.po index 67eb990..f3b5a25 100644 --- a/chimere/locale/fr/LC_MESSAGES/django.po +++ b/chimere/locale/fr/LC_MESSAGES/django.po @@ -1,13 +1,13 @@ # Chimère -# Copyright (C) 2008-2010 +# Copyright (C) 2008-2011 # This file is distributed under the same license as the Chimère package. -# Étienne Loks <etienne.loks@peacefrogs.net>, 2008. +# Étienne Loks <etienne.loks@peacefrogs.net>, 2008-2011. # msgid "" msgstr "" "Project-Id-Version: 0.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-09 15:34+0200\n" +"POT-Creation-Date: 2011-09-11 17:06+0200\n" "PO-Revision-Date: 2010-03-20 20:00+0100\n" "Last-Translator: Étienne Loks <etienne.loks@peacefrogs.net>\n" "MIME-Version: 1.0\n" @@ -68,11 +68,11 @@ msgstr "Une date de fin a été donnée sans date de début" msgid "Image" msgstr "Image" -#: main/forms.py:268 +#: main/forms.py:267 msgid "Bad file format: this must be a GPX or KML file" msgstr "Mauvais format de fichier : KML et GPX sont supportés" -#: main/forms.py:276 main/models.py:554 +#: main/forms.py:275 main/models.py:554 msgid "Area" msgstr "Zone" @@ -264,11 +264,11 @@ msgstr "Valeur" msgid "Property" msgstr "Propriété" -#: main/views.py:275 +#: main/views.py:274 msgid "Comments/request on the map" msgstr "Commentaires/requètes sur la carte" -#: main/views.py:278 +#: main/views.py:277 msgid "" "Thank you for your contribution. It will be taken into account. If you have " "left your email you may be contacted soon for more details." @@ -277,11 +277,11 @@ msgstr "" "laissé votre courriel vous serez peut-être contacté bientôt pour plus de " "détails." -#: main/views.py:282 +#: main/views.py:281 msgid "Temporary error. Renew your message later." msgstr "Erreur temporaire. Réenvoyez votre message plus tard." -#: main/views.py:391 +#: main/views.py:390 msgid "No category available in this area." msgstr "Pas de catégorie disponible sur cette zone." @@ -360,20 +360,21 @@ msgstr "" #: main/widgets.py:186 msgid "Give a name and set category before uploading a file." -msgstr "Renseignez le nom et choisissez au moins une catégorie avant de déposer " -"un fichier." +msgstr "" +"Renseignez le nom et choisissez au moins une catégorie avant de déposer un " +"fichier." #: main/widgets.py:189 msgid "Upload a route file (GPX or KML)" msgstr "Déposer un trajet (fichier GPX ou KML)" -#: main/widgets.py:195 -msgid "Start drawing" -msgstr "Commencer le tracé" +#: main/widgets.py:190 +msgid "or" +msgstr "ou" #: main/widgets.py:195 -msgid "Stop drawing" -msgstr "Arrêter le tracé" +msgid "Start \"hand\" drawing" +msgstr "Commencer le tracé manuellement" #: main/widgets.py:335 msgid "Select..." @@ -544,7 +545,7 @@ msgstr "" msgid "Upload a file" msgstr "Déposer un fichier" -#: templates/upload_file.html:37 +#: templates/upload_file.html:41 msgid "Upload" msgstr "Déposer" @@ -556,3 +557,5 @@ msgstr "Voir sur la carte" msgid "Administration de Chimère" msgstr "Administration de Chimère" +#~ msgid "Stop drawing" +#~ msgstr "Arrêter le tracé" diff --git a/chimere/main/views.py b/chimere/main/views.py index 98c514d..05cd873 100644 --- a/chimere/main/views.py +++ b/chimere/main/views.py @@ -189,7 +189,6 @@ def processRouteFile(request, area_name='', file_id=None): else: return HttpResponse(status=400) - def editRoute(request, area_name=""): """ Route edition page diff --git a/chimere/main/widgets.py b/chimere/main/widgets.py index 083fbec..daaaff8 100644 --- a/chimere/main/widgets.py +++ b/chimere/main/widgets.py @@ -184,15 +184,15 @@ the desired position")) var error_msg = "%s"; // --></script> """ % _(u"Give a name and set category before uploading a file.") - tpl += u'<div class="upload"><a href="#" class="upload-button" '\ + tpl += u'<div id="upload"><a href="#" class="upload-button" '\ u'onclick="uploadFile(error_msg);return false;">%s</a></div>' % ( _(u"Upload a route file (GPX or KML)")) - - tpl += u"""<div id='draw-toggle-off' class='toggle-button' \ -onclick='toggleDrawOn();'>%s</div> -<div id='draw-toggle-on' class='toggle-button' \ -onclick='toggleDrawOff();'>%s</div> -<hr class='spacer'/>""" % (_("Start drawing"), _("Stop drawing")) + tpl += u"""\n<p id='draw-or'>%s</p>\n""" % _(u"or") + tpl += u"""<div id='draw-label'><div id='draw-toggle-off' \ +class='toggle-button' onclick='toggleDrawOn();'> +<a href='#' onclick='return false;'>%s</a></div> +</div> +<hr class='spacer'/>""" % (_(u"Start \"hand\" drawing")) tpl += """ <div id='map_edit'></div>""" if not value: diff --git a/chimere/static/edit_route_map.js b/chimere/static/edit_route_map.js index 52d7ffd..a2d8bf1 100644 --- a/chimere/static/edit_route_map.js +++ b/chimere/static/edit_route_map.js @@ -129,18 +129,13 @@ function init(){ function toggleDrawOn() { currentControl.activate(); document.getElementById('draw-toggle-off').style.display = 'None'; - document.getElementById('draw-toggle-on').style.display = 'block'; + document.getElementById('draw-or').style.display = 'None'; + document.getElementById('upload').style.display = 'None'; if (currentFeature){ pathModify.selectControl.select(currentFeature); } } -function toggleDrawOff() { - currentControl.deactivate(); - document.getElementById('draw-toggle-on').style.display = 'None'; - document.getElementById('draw-toggle-off').style.display = 'block'; -} - function checkFields(){ if (!jQuery("#id_name").val() || !jQuery("#id_categories").val()){ diff --git a/chimere/static/forms.css b/chimere/static/forms.css index c8e4939..dea37f0 100644 --- a/chimere/static/forms.css +++ b/chimere/static/forms.css @@ -1,3 +1,11 @@ +/* colors definition */ + +.toggle-button{ +color: #5b80b2; +} + +/**/ + #map_edit{ border: 1px solid black; width:700px; @@ -11,21 +19,31 @@ float:left; } .toggle-button{ -float:left; -padding:4px; --moz-border-radius: 4px; --webkit-border-radius: 4px; -border-radius: 4px; -border:1px solid grey; +margin:4px 0; +padding:2px 0; +} + +#upload, #draw-label{ +vertical-align:center; +background-repeat:no-repeat; +font-size:20px; +padding:30px 0; +padding-left:80px; +} + +#upload{ +background-image:url('img/upload.png'); } -#draw-toggle-off{ -color:black; +#draw-label{ +background-image:url('img/drawing.png'); } -#draw-toggle-on{ -background-color:lightgrey; -display:None; +#draw-or{ +padding:0; +padding-left:80px; +margin:0; +font-size:16px; } .help-route{ diff --git a/chimere/static/img/drawing.png b/chimere/static/img/drawing.png Binary files differnew file mode 100644 index 0000000..a2d3a30 --- /dev/null +++ b/chimere/static/img/drawing.png diff --git a/chimere/static/img/upload_images.licence b/chimere/static/img/images_licences index cf7408c..6dc68fd 100644 --- a/chimere/static/img/upload_images.licence +++ b/chimere/static/img/images_licences @@ -1,16 +1,25 @@ -Upload image credit -* Farm-Fresh layer gps.png in Farm-Fresh Web Icons +* Upload image credit + + * Farm-Fresh layer gps.png in Farm-Fresh Web Icons Author: FatCow Web Hosting Licence: Creative Commons Attribution 3.0 United States license Url: http://commons.wikimedia.org/wiki/File:Farm-Fresh_layer_gps.png -* Image from the Nuvola icon theme for KDE 3.x by David Vignoni + * Image from the Nuvola icon theme for KDE 3.x by David Vignoni Author: David Vignoni Licence: GNU Lesser General Public License version 2.1 or any later version Url: http://commons.wikimedia.org/wiki/File:Nuvola_apps_download_manager2.svg -* Icon from the Tango! project set. + * Icon from the Tango! project set. Author: The Tango! Desktop Project Licence: Public domain Url: http://commons.wikimedia.org/wiki/File:Internet-web-browser.svg + +* Drawing image credit + + * Icons from the Tango! project set. +Author: The Tango! Desktop Project +Licence: Public domain +Url: http://commons.wikimedia.org/wiki/File:Edit-find-replace.svg +Url 2: http://commons.wikimedia.org/wiki/File:Internet-web-browser.svg diff --git a/chimere/static/img/upload.png b/chimere/static/img/upload.png Binary files differindex 53d7636..367c2d9 100644 --- a/chimere/static/img/upload.png +++ b/chimere/static/img/upload.png diff --git a/chimere/static/styles.css b/chimere/static/styles.css index 5b02d92..b56b2ab 100644 --- a/chimere/static/styles.css +++ b/chimere/static/styles.css @@ -1,3 +1,11 @@ +/* colors definition */ + +a, a:link, a:visited, legend{ +color: #5b80b2; +} + +/**/ + body{ background-color:#b488ff; font-family:arial; @@ -17,11 +25,6 @@ margin:4px 8px; legend{ font-weight:bold; -color:#b400Ff; -} - -a{ -color:#b400Ff; } h2{ @@ -512,15 +515,6 @@ color:#b488ff; .simple .cloud img{display:None;} -.upload{ -vertical-align:center; -background-image:url('img/upload.png'); -background-repeat:no-repeat; -padding:40px; -padding-left:80px; -font-size:20px;; -} - .window{ background-color:#FFF; } diff --git a/chimere/templates/upload_file.html b/chimere/templates/upload_file.html index 21a964a..a4288da 100644 --- a/chimere/templates/upload_file.html +++ b/chimere/templates/upload_file.html @@ -26,7 +26,11 @@ var main_page = opener.document; jQuery(main_page).find("#id_route").val(data.wkt); jQuery(main_page).find("#id_associated_file_id").val(data.file_id); + jQuery(main_page).find("#draw-or").hide(); + jQuery(main_page).find("#draw-toggle-off").hide(); + jQuery(main_page).find("#upload").hide(); opener.initFeatureFromWkt(data.wkt); + opener.toggleDrawOn(); opener.focus(); self.close(); }); |