Permalink
Browse files

fixed map borders, preferential clicking and zip code save

  • Loading branch information...
1 parent 7fa79ac commit d4135d4aedd313666ade15f8d9c65115a6cadd82 Carissa Brittain committed Apr 9, 2012
View
6 static/css/SanFrancisco/treemap.css
@@ -31,7 +31,13 @@ height:400px;
position:relative;
height:480px;
width:622px;
+}
+#results_map_wrap{
+height:480px;
+width:622px;
border:10px solid #eef5d8;
+overflow: hidden;
+position:relative;
}
#favorite_tree_map{
height:250px;
View
7 static/treemap.js
@@ -97,8 +97,13 @@ var tm = {
$("#species_search_id_cultivar").val(item.cultivar).change();
} else {
$("#species_search_id_cultivar").val("").change();
- }
+ }
});
+ if ($('#id_species_name')) {
+ tm.setupAutoComplete($('#id_species_name')).result(function(event, item) {
+ $("#id_species_id").val(item.symbol).change();
+ });
+ }
tm.setupSpeciesList();
var spec = $.address.parameter("species");
var cultivar = $.address.parameter("cultivar");
View
2 templates/SanFrancisco/treemap/results.html
@@ -71,7 +71,7 @@
{% endblock %}
{% block top_right_panel %}
- <div class="wrap">
+ <div class="wrap" id="results_map_wrap">
<div id="results_map">
<div class="mapToggle buttomSm">View Satellite</div>
</div>
View
2 treemap/models.py
@@ -609,6 +609,8 @@ def save(self,*args,**kwargs):
self.old_species.save()
if hasattr(self,'species') and self.species:
self.species.save()
+
+ super(Tree, self).save(*args,**kwargs)
#if n:
# for nhood in n:
View
2 treemap/views.py
@@ -209,7 +209,7 @@ def tree_location_search(request):
species = request.GET.get('species')
if species:
# first try to restrict search to the active tree species
- species_trees = trees.filter(species__symbol=species)
+ species_trees = trees.filter(species__id=species)
# to allow clicking other trees still...
if species_trees.exists():
trees = species_trees

0 comments on commit d4135d4

Please sign in to comment.