Add shortcut to show about dialog
Press 'H' to get to the helpful about dialog.
This commit is contained in:
parent
d106552ad3
commit
e56d213931
3 changed files with 15 additions and 5 deletions
|
|
@ -100,7 +100,11 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-item">
|
<div
|
||||||
|
class="nav-item"
|
||||||
|
data-i18n="[title]about.tooltip"
|
||||||
|
title="Show more information about BRouter-Web"
|
||||||
|
>
|
||||||
<a class="nav-link" href="#" data-toggle="modal" data-target="#about"
|
<a class="nav-link" href="#" data-toggle="modal" data-target="#about"
|
||||||
><span class="fa fa-lg fa-info-circle" aria-hidden="true"></span
|
><span class="fa fa-lg fa-info-circle" aria-hidden="true"></span
|
||||||
><span data-i18n="navbar.about">About</span></a
|
><span data-i18n="navbar.about">About</span></a
|
||||||
|
|
|
||||||
|
|
@ -101,9 +101,14 @@
|
||||||
document,
|
document,
|
||||||
'keydown',
|
'keydown',
|
||||||
function(e) {
|
function(e) {
|
||||||
if (BR.Util.keyboardShortcutsAllowed(e) && e.keyCode === 8 && !$('.modal.show').length) {
|
if (BR.Util.keyboardShortcutsAllowed(e) && !$('.modal.show').length) {
|
||||||
|
if (e.keyCode === 8) {
|
||||||
// char code for 'backspace'
|
// char code for 'backspace'
|
||||||
clearRoute();
|
clearRoute();
|
||||||
|
} else if (e.keyCode === 72) {
|
||||||
|
// char code for 'h'
|
||||||
|
$('#about').modal('show');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
this
|
this
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
"description": "Online service of the BRouter routing engine. For the offline Android app and more information see <a href=\"https://brouter.de/\" target=\"_blank\">brouter.de</a>",
|
"description": "Online service of the BRouter routing engine. For the offline Android app and more information see <a href=\"https://brouter.de/\" target=\"_blank\">brouter.de</a>",
|
||||||
"details": "<i><a href=\"{{privacyPolicyUrl}}\" target=\"_blank\">Privacy Policy</a></i>, \n<i><a href=\"https://github.com/nrenner/brouter-web#credits-and-licenses\" target=\"_blank\">Credits</a></i>,\n<i><a href=\"https://github.com/nrenner/brouter-web/blob/master/CHANGELOG.md\" target=\"_blank\">Changelog</a></i> and\n<i><a href=\"https://github.com/nrenner/brouter-web#readme\" target=\"_blank\">more info</a></i> on the client.",
|
"details": "<i><a href=\"{{privacyPolicyUrl}}\" target=\"_blank\">Privacy Policy</a></i>, \n<i><a href=\"https://github.com/nrenner/brouter-web#credits-and-licenses\" target=\"_blank\">Credits</a></i>,\n<i><a href=\"https://github.com/nrenner/brouter-web/blob/master/CHANGELOG.md\" target=\"_blank\">Changelog</a></i> and\n<i><a href=\"https://github.com/nrenner/brouter-web#readme\" target=\"_blank\">more info</a></i> on the client.",
|
||||||
"support": "General discussions/questions, support",
|
"support": "General discussions/questions, support",
|
||||||
"title": "About"
|
"title": "About",
|
||||||
|
"tooltip": "Show more information about Brouter-Web (H key)"
|
||||||
},
|
},
|
||||||
"credits": {
|
"credits": {
|
||||||
"brouter": "BRouter",
|
"brouter": "BRouter",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue