summaryrefslogtreecommitdiff
path: root/chimere/static/edit_route_map.js
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/static/edit_route_map.js')
-rw-r--r--chimere/static/edit_route_map.js19
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');
+}