diff options
| -rw-r--r-- | chimere/templates/chimere/blocks/live_coordinates.html | 10 | ||||
| -rw-r--r-- | chimere/widgets.py | 2 | 
2 files changed, 6 insertions, 6 deletions
diff --git a/chimere/templates/chimere/blocks/live_coordinates.html b/chimere/templates/chimere/blocks/live_coordinates.html index e2a6420..eb6c4c3 100644 --- a/chimere/templates/chimere/blocks/live_coordinates.html +++ b/chimere/templates/chimere/blocks/live_coordinates.html @@ -30,14 +30,14 @@  <script type="text/javascript">    $('#map_edit').chimere(chimere_init_options); -  if({{isvalue}}) { -    var mylonlat = new OpenLayers.LonLat({{value_x|stringformat:"f"}}, -                                         {{value_y|stringformat:"f"}}); -    $("#map_edit").chimere( +  {% if isvalue %} +  var mylonlat = new OpenLayers.LonLat({{value_x|stringformat:"f"}}, +                                       {{value_y|stringformat:"f"}}); +  $("#map_edit").chimere(          "putEditMarker",          mylonlat.transform(EPSG_DISPLAY_PROJECTION, EPSG_PROJECTION),          true); -  } +  {% endif %}    $('#live_latitude').change(function() {      var mylonlat = new OpenLayers.LonLat($('#live_longitude').val(),                                           $('#live_latitude').val()); diff --git a/chimere/widgets.py b/chimere/widgets.py index c463b7d..2d0c189 100644 --- a/chimere/widgets.py +++ b/chimere/widgets.py @@ -192,7 +192,7 @@ class PointChooserWidget(forms.TextInput):                                'value_x': value_x,                                'name': name,                                'val': val, -                              'isvalue': "true" if value else "false", +                              'isvalue': bool(value),                                'default_area': "true" if default_area else "false",                                }) % \              (settings.STATIC_URL,  | 
