pull/144/head
Henrique Dias 2016-12-31 19:13:35 +00:00
parent 1f5dcf5a0e
commit 9759400751
2 changed files with 35 additions and 3 deletions

View File

@ -108,7 +108,7 @@ var removeLastDirectoryPartOf = function(url) {
* *
* * * * * * * * * * * * * * * */
function closePrompt(event) {
let prompt = document.querySelector('.prompt');
let prompt = document.querySelector('.prompt:not(.help)');
event.preventDefault();
document.querySelector('.overlay').classList.remove('active');
@ -350,6 +350,20 @@ function setupSearch() {
searchInput.addEventListener('keyup', searchEvent);
}
function closeHelp() {
document.querySelector('.help').classList.remove('active');
document.querySelector('.overlay').classList.remove('active');
}
document.addEventListener('keydown', (event) => {
if (event.keyCode == 112) {
event.preventDefault();
document.querySelector('.help').classList.add('active');
document.querySelector('.overlay').classList.add('active');
}
});
/* * * * * * * * * * * * * * * *
* *
* BOOTSTRAP *

View File

@ -13,8 +13,6 @@
<style>{{ CSS .User.StyleSheet }}</style>
{{- end -}}
<!-- SCRIPTS -->
<!-- User Data and Permissions; WebDavURL -->
<script>
var user = JSON.parse('{{ Marshal .User }}'),
webdavURL = "{{.Config.AbsoluteURL}}{{.Config.WebDavURL}}",
@ -165,6 +163,26 @@
</div>
</div>
</template>
<!-- TODO: open this with F1; enabke everythings -->
<div class="help">
<h3>Help</h3>
<p>
<ul>
<li>F1 - This information!</li>
<li>F2 - Rename file</li>
<li>Double click to open a file or directory</li>
<li>Click to select file or directory</li>
<li>CTRL + Click to select multiple files or directories</li>
<li>DEL to delete a file or directory</li>
<li>ESC to clear selection and/or close the prompt</li>
<li>CTRL + S to save a file or download the directory where you are</li>
</ul>
</p>
<div>
<button type="submit" onclick="closeHelp(event);" class="ok">OK</button>
</div>
</div>
<footer>Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> and <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
</body>