diff options
| -rw-r--r-- | chimere/main/actions.py | 2 | ||||
| -rw-r--r-- | chimere/main/views.py | 4 | ||||
| -rw-r--r-- | chimere/static/base.js | 14 | ||||
| -rw-r--r-- | chimere/static/edit_route_map.js | 2 | ||||
| -rw-r--r-- | chimere/static/main_map.js | 2 | ||||
| -rw-r--r-- | chimere/urls.py | 2 |
6 files changed, 20 insertions, 6 deletions
diff --git a/chimere/main/actions.py b/chimere/main/actions.py index 74b622a..4857005 100644 --- a/chimere/main/actions.py +++ b/chimere/main/actions.py @@ -27,7 +27,7 @@ from chimere.settings import EXTRA_URL class Action: def __init__(self, id, path, label): - self.id, self.path, self.label = id, EXTRA_URL + path, label + self.id, self.path, self.label = id, path, label actions = ((Action('view', '', _('View')), []), (Action('contribute', 'edit', _('Contribute')), diff --git a/chimere/main/views.py b/chimere/main/views.py index e6e37c2..6cd335d 100644 --- a/chimere/main/views.py +++ b/chimere/main/views.py @@ -49,7 +49,9 @@ def get_base_response(area_name=""): if not base_url.startswith('/'): base_url = '/' + base_url if area_name: - base_url = '/' + area_name + base_url + if base_url[-1] != '/': + base_url += '/' + base_url += area_name + '/' base_response_dct['extra_url'] = base_url base_response_dct['area_name'] = area_name if settings.CSS_AREAS and area_name: diff --git a/chimere/static/base.js b/chimere/static/base.js index 70b8742..1eba699 100644 --- a/chimere/static/base.js +++ b/chimere/static/base.js @@ -20,6 +20,18 @@ See the file COPYING for details. var default_area; var area_name; +/* indexOf definition for old IE versions */ +if(!Array.indexOf){ + Array.prototype.indexOf = function(obj){ + for(var i=0; i<this.length; i++){ + if(this[i]==obj){ + return i; + } + } + return -1; + } +} + /* show a block panel */ function show(id){ document.getElementById(id).style.display = 'block'; @@ -45,7 +57,7 @@ function getExtent() { var map_extent; var extent_key = 'MAP_EXTENT'; if (area_name){ extent_key = extent_key + '_' + area_name; } - for (i in cookies){ + for (var i=0; i < cookies.length; i++){ var items = cookies[i].split('='); key = items[0].split(' ').join(''); if (key == extent_key){ diff --git a/chimere/static/edit_route_map.js b/chimere/static/edit_route_map.js index 28a0498..69a24aa 100644 --- a/chimere/static/edit_route_map.js +++ b/chimere/static/edit_route_map.js @@ -95,7 +95,7 @@ function init(){ maxResolution: 156543.0399, units: 'm', projection: epsg_projection, - displayProjection: epsg_display_projection, + displayProjection: epsg_display_projection }; if (restricted_extent){options['restrictedExtent'] = restricted_extent;} map = new OpenLayers.Map('map_edit', options); diff --git a/chimere/static/main_map.js b/chimere/static/main_map.js index 5c698c1..67d1bee 100644 --- a/chimere/static/main_map.js +++ b/chimere/static/main_map.js @@ -452,7 +452,7 @@ function init(){ maxResolution: 156543.0399, units: 'm', projection: new OpenLayers.Projection('EPSG:4326'), - theme:null, + theme:null }; if (restricted_extent){options['restrictedExtent'] = restricted_extent;} map = new OpenLayers.Map('map', options); diff --git a/chimere/urls.py b/chimere/urls.py index d725d0b..f8a47d8 100644 --- a/chimere/urls.py +++ b/chimere/urls.py @@ -59,7 +59,7 @@ urlpatterns += patterns('chimere.main.views', (base + extra + r'contact/$', 'contactus'), (base + extra + r'edit/$', 'edit'), (base + extra + r'edit_route/$', 'editRoute'), -(base + extra + r'submited/(?P<action>\w+)/$', 'submited'), +(base + extra + r'submited/(\w+)/$', 'submited'), (base + extra + r'getDetail/(?P<marker_id>\d+)/$', 'getDetail'), (base + extra + r'getDescriptionDetail/(?P<category_id>\d+)/$', 'getDescriptionDetail'), |
