Ajout affichage raccourcis K-Psul avec ctrl+Hw

This commit is contained in:
Aurélien Delobelle 2016-09-11 22:55:46 +02:00
parent 8d20dbfe24
commit dc4f0473fe
3 changed files with 111 additions and 0 deletions

View file

@ -297,3 +297,47 @@ textarea {
.messages .alert-success {
color:#333;
}
/*
* Help
*/
.help {
display:none;
position:fixed;
top:50px;
left:0;
right:0;
bottom:0;
overflow:auto;
background:rgba(51,51,51,0.3);
z-index:500;
}
.help-box {
margin-top:30px;
padding-top:1px;
padding-bottom:15px;
background:rgba(51,51,51,0.7);
color:#fff;
}
@media (max-width:768px) {
.help-box {
margin:20px 15px;
}
}
.help h2 {
padding:0 15px 20px;
border-bottom:1px solid #999;
text-align:center;
}
.help .row > div {
padding-right:0;
}
.help h4 {
margin:15px 0;
}

View file

@ -40,5 +40,13 @@
{% block content %}{% endblock %}
{% include "kfet/base_footer.html" %}
</div>
<div class="help">
<div class="help-box col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
<div class="help-content">
<h2>Aide</h2>
{% block help %}{% endblock %}
</div>
</div>
</div>
</body>
</html>

View file

@ -19,6 +19,55 @@
{% block content-header %}{% endblock %}
{% block help %}
<div class="row">
<div class="col-md-6">
<div class="block">
<h4>Opérations</h4>
<div class="row">
<div class="col-xs-3"><b>F3</b></div>
<div class="col-xs-9">Charge</div>
</div>
<div class="row">
<div class="col-xs-3"><b>Shift + F3</b></div>
<div class="col-xs-9">Retrait</div>
</div>
<div class="row">
<div class="col-xs-3"><b>F8</b></div>
<div class="col-xs-9">Edition</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="block">
<h4>Général</h4>
<div class="row">
<div class="col-xs-3"><b>F1</b></div>
<div class="col-xs-9">Reset</div>
</div>
<div class="row">
<div class="col-xs-3"><b>F2</b></div>
<div class="col-xs-9">Reset compte</div>
</div>
<div class="row">
<div class="col-xs-3"><b>Shift + F2</b></div>
<div class="col-xs-9">Reset panier</div>
</div>
<div class="row">
<div class="col-xs-3"><b>F9</b></div>
<div class="col-xs-9">Majoration</div>
</div>
<div class="row">
<div class="col-xs-3"><b>F10</b></div>
<div class="col-xs-9">Hard reset</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block content %}
{% include 'kfet/base_messages.html' %}
@ -1164,6 +1213,16 @@ $(document).ready(function() {
$(document).on('keydown', function(e) {
switch (e.keyCode) {
case 27:
// Escape - Hide help
$('.help').hide('fast');
return false;
case 72:
if (e.ctrlKey) {
// Ctrl+H - Display help
$('.help').show('fast');
}
return false;
case 112:
// F1 - Cool reset
coolReset();