change icons of locate buttons

This commit is contained in:
Laura Klünder 2017-12-24 04:43:17 +01:00
parent 6805f2fb5f
commit 93dd1d3e32
2 changed files with 8 additions and 3 deletions

View file

@ -45,6 +45,7 @@ c3nav = {
if (window.mobileclient) {
$('#attributions').find('a:not([href^="http"]):not([href^="//"])').removeAttr('target');
$('body').addClass('mobileclient');
c3nav._set_user_location(null);
}
},
load_searchable_locations: function() {
@ -1247,7 +1248,11 @@ c3nav = {
});
},
_set_user_location: function(location) {
if (location) {
$('.locationinput .locate').text('my_location');
} else {
$('.locationinput .locate').text('location_searching');
}
}
};
$(document).ready(c3nav.init);

View file

@ -46,14 +46,14 @@
<i class="icon material-icons">place</i>
<input type="text" autocomplete="off" spellcheck="false" placeholder="{% trans 'Search any location…' %}">
<small></small>
<button class="button-clear locate material-icons">my_location</button>
<button class="button-clear locate material-icons">location_disabled</button>
<button class="button-clear clear material-icons">clear</button>
</div>
<div class="location locationinput empty" id="destination-input">
<i class="icon material-icons">place</i>
<input type="text" autocomplete="off" spellcheck="false" placeholder="{% trans 'Search any location…' %}">
<small></small>
<button class="button-clear locate material-icons">my_location</button>
<button class="button-clear locate material-icons">location_disabled</button>
<button class="button-clear clear material-icons">clear</button>
</div>
<i class="material-icons" id="route-dots">more_vert</i>