click route button

This commit is contained in:
Laura Klünder 2017-10-28 19:30:04 +02:00
parent b5337af65e
commit 9bdea3b4b4
2 changed files with 9 additions and 3 deletions

View file

@ -13,7 +13,13 @@ c3nav = {
init_sidebar: function () {
c3nav.init_locationinputs();
$('#location-buttons').find('.route').on('click', c3nav._location_buttons_route_click);
},
_location_buttons_route_click: function () {
$('#search').removeClass('location-view').addClass('route-view');
},
init_locationinputs: function () {
c3nav.locations = [];
c3nav.locations_by_slug = {};

View file

@ -38,9 +38,9 @@
<button class="button-clear clear"></button>
</div>
<div class="buttons" id="location-buttons">
<button class="button-clear">Details</button>
<button class="button-clear">Share</button>
<button class="button-clear">Route</button>
<button class="button-clear details">Details</button>
<button class="button-clear share">Share</button>
<button class="button-clear route">Route</button>
</div>
<div class="buttons" id="route-buttons">
<button class="button-clear">swap</button>