diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-09-09 17:01:17 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-09-09 17:01:17 +0200 |
commit | d3b04460bbb5d1e7eb7ed28220ae305cce6ad6e2 (patch) | |
tree | 6c26a535ef8532b912ff892d5936c013015dabfc /chimere/static/edit_route_map.js | |
parent | 0ccc30e337bb046000fb76d2337c2fb9792bc71f (diff) | |
download | Chimère-d3b04460bbb5d1e7eb7ed28220ae305cce6ad6e2.tar.bz2 Chimère-d3b04460bbb5d1e7eb7ed28220ae305cce6ad6e2.zip |
Association of a GPX (or KML) file to a route (closes #302)
- template file for upload
- js finalisation and debug
- css
- "artwork"
- french translation
Diffstat (limited to 'chimere/static/edit_route_map.js')
-rw-r--r-- | chimere/static/edit_route_map.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chimere/static/edit_route_map.js b/chimere/static/edit_route_map.js index cb6f148..52d7ffd 100644 --- a/chimere/static/edit_route_map.js +++ b/chimere/static/edit_route_map.js @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +/* Copyright (C) 2008-2011 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -42,7 +42,6 @@ function featureCreated(event) { pathModify.activate(); updateForm(event); pathModify.selectControl.select(event.feature); - } function initFeature(json_geometry){ @@ -141,3 +140,19 @@ function toggleDrawOff() { 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()){ + return false; + } + return true; +} + +function uploadFile(error_msg) { + if(!checkFields()){ + alert(error_msg); + return; + } + open_window(extra_url + 'upload_file'); +} |