Skip to content

Commit

Permalink
Clicking anywhere on sidebar row should fire click
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcbride committed Sep 3, 2014
1 parent b50dfdc commit f47e027
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ input[type="radio"], input[type="checkbox"] {
.white {
color: #FFFFFF;
}
.feature-row {
cursor: pointer;
}
.sidebar-wrapper {
width: 100%;
height: 100%;
Expand Down
6 changes: 3 additions & 3 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var map, featureList, boroughSearch = [], theaterSearch = [], museumSearch = [];

$(document).on("click", ".feature-name", function(e) {
$(document).on("click", ".feature-row", function(e) {
sidebarClick(parseInt($(this).attr('id')));
});

Expand Down Expand Up @@ -263,7 +263,7 @@ var theaters = L.geoJson(null, {
}));
}
});
$("#feature-list tbody").append('<tr style="cursor: pointer;"><td style="vertical-align: middle;"><img width="16" height="18" src="assets/img/theater.png"></td><td class="feature-name" id="'+L.stamp(layer)+'">'+layer.feature.properties.NAME+'</td><td style="vertical-align: middle;"><i class="fa fa-chevron-right pull-right"></i></td></tr>');
$("#feature-list tbody").append('<tr class="feature-row" id="'+L.stamp(layer)+'"><td style="vertical-align: middle;"><img width="16" height="18" src="assets/img/theater.png"></td><td class="feature-name">'+layer.feature.properties.NAME+'</td><td style="vertical-align: middle;"><i class="fa fa-chevron-right pull-right"></i></td></tr>');
theaterSearch.push({
name: layer.feature.properties.NAME,
address: layer.feature.properties.ADDRESS1,
Expand Down Expand Up @@ -311,7 +311,7 @@ var museums = L.geoJson(null, {
}));
}
});
$("#feature-list tbody").append('<tr style="cursor: pointer;"><td style="vertical-align: middle;"><img width="16" height="18" src="assets/img/museum.png"></td><td class="feature-name" id="'+L.stamp(layer)+'">'+layer.feature.properties.NAME+'</td><td style="vertical-align: middle;"><i class="fa fa-chevron-right pull-right"></i></td></tr>');
$("#feature-list tbody").append('<tr class="feature-row" id="'+L.stamp(layer)+'"><td style="vertical-align: middle;"><img width="16" height="18" src="assets/img/museum.png"></td><td class="feature-name">'+layer.feature.properties.NAME+'</td><td style="vertical-align: middle;"><i class="fa fa-chevron-right pull-right"></i></td></tr>');
museumSearch.push({
name: layer.feature.properties.NAME,
address: layer.feature.properties.ADRESS1,
Expand Down

0 comments on commit f47e027

Please sign in to comment.