add hotkey to wiki pages
This commit is contained in:
@ -7,12 +7,17 @@ block content
|
|||||||
.panel-heading.text-center
|
.panel-heading.text-center
|
||||||
h1= title
|
h1= title
|
||||||
.panel-body
|
.panel-body
|
||||||
div!= description
|
.row
|
||||||
|
.col-xs-12
|
||||||
|
div!= description
|
||||||
.spacer
|
.spacer
|
||||||
.text-center
|
.spacer
|
||||||
.next-wiki-button.btn.btn-primary.btn-big Take me to the next article
|
.spacer
|
||||||
.ten-pixel-break
|
.col-xs-12.col-sm-6.col-sm-offset-3
|
||||||
#showAllButton.btn.btn-info.btn-big Show all wiki articles
|
.text-center
|
||||||
|
.next-wiki-button.btn.btn-primary.btn-big.btn-block Next article (ctrl + enter)
|
||||||
|
.ten-pixel-break
|
||||||
|
#showAllButton.btn.btn-info.btn-big.btn-block Show me all wiki articles
|
||||||
.spacer
|
.spacer
|
||||||
.row
|
.row
|
||||||
.col-xs-12.text-center
|
.col-xs-12.text-center
|
||||||
@ -27,3 +32,11 @@ block content
|
|||||||
.modal-body
|
.modal-body
|
||||||
include ../partials/wikis
|
include ../partials/wikis
|
||||||
#wikiId.hidden= wikiId
|
#wikiId.hidden= wikiId
|
||||||
|
script.
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('body').keydown(function(e) {
|
||||||
|
if (e.ctrlKey && e.keyCode == 13) {
|
||||||
|
$('.next-wiki-button').click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user