diff --git a/TODO b/TODO index 9901183..a7218d3 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ ## GENERAL - * delete key bound to del dbox - * ai search, should put 'all' at top of drop-down * add an option on the person menu to run_ai_on all photos (or at least import/storage) diff --git a/templates/files.html b/templates/files.html index 45205fe..3ad1252 100644 --- a/templates/files.html +++ b/templates/files.html @@ -351,5 +351,18 @@ $(document).ready(function() { } $(".dir").click( function(e) { $('#offset').val(0) ; $('#cwd').val( $(this).attr('dir') ) ; $('#main_form').submit() } ) } ) + +$( document ).keydown(function(event) { + switch (event.key) + { + case "Delete": + {% if "files_rbp" in request.url %} + if( ! NoSel() ) DelDBox('Restore'); + {% else %} + if( ! NoSel() ) DelDBox('Delete'); + {% endif %} + break; + } +}); {% endblock script_content %}