recommend the app when clicking he locate button on another device
This commit is contained in:
parent
93dd1d3e32
commit
f2b8ba05a3
3 changed files with 18 additions and 2 deletions
|
@ -131,6 +131,9 @@ main.account form {
|
|||
#modal-content :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.app-download-buttons {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#map {
|
||||
position: absolute;
|
||||
|
|
|
@ -705,6 +705,7 @@ c3nav = {
|
|||
.on('blur', c3nav._locationinput_blur)
|
||||
.on('keydown', c3nav._locationinput_keydown);
|
||||
$('.locationinput .clear').on('click', c3nav._locationinput_clear);
|
||||
$('.locationinput .locate').on('click', c3nav._locationinput_locate);
|
||||
$('#autocomplete').on('mouseover', '.location', c3nav._locationinput_hover_suggestion)
|
||||
.on('click', '.location', c3nav._locationinput_click_suggestion);
|
||||
$('html').on('focus', '*', c3nav._locationinput_global_focuschange)
|
||||
|
@ -738,6 +739,11 @@ c3nav = {
|
|||
c3nav.update_state();
|
||||
$(this).parent().find('input').focus();
|
||||
},
|
||||
_locationinput_locate: function () {
|
||||
if (!window.mobileclient) {
|
||||
c3nav.open_modal($('#app-ad').html());
|
||||
}
|
||||
},
|
||||
_locationinput_reset_autocomplete: function () {
|
||||
// hide autocomplete
|
||||
var $autocomplete = $('#autocomplete');
|
||||
|
@ -937,7 +943,7 @@ c3nav = {
|
|||
},
|
||||
_modal_link_click: function(e) {
|
||||
var location = $(this).attr('href');
|
||||
if (location.startsWith('/control/')) {
|
||||
if ($(this).is('[target]') || location.startsWith('/control/')) {
|
||||
$(this).attr('target', '_blank');
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<button class="button-clear as-origin">{% trans 'Route from here' %}</button>
|
||||
</section>
|
||||
<section class="share-ui">
|
||||
<h3>Share</h3>
|
||||
<h3>{% trans 'Share' %}</h3>
|
||||
<img src="">
|
||||
<input type="text" readonly>
|
||||
<p>
|
||||
|
@ -37,6 +37,13 @@
|
|||
<button class="mobileclient-shortcut">{% trans 'create shortcut' %}</button>
|
||||
</p>
|
||||
</section>
|
||||
<section id="app-ad">
|
||||
<h3>{% trans 'Wifi-based location' %}</h3>
|
||||
<p>{% trans 'Get the c3nav app for Android to see your location on the map.' %}</p>
|
||||
<p class="app-download-buttons">
|
||||
<a class="button" href="https://play.google.com/store/apps/details?id=de.c3nav.droid" target="_blank">Google Play</a>
|
||||
</p>
|
||||
</section>
|
||||
<section class="reload-msg">
|
||||
<img src="{% static 'img/loader.gif' %}">
|
||||
</section>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue