[home] Enable keyboard shortcut to select all the documents like on a desktop
@@ -23,7 +23,8 @@ from desktop.views import _ko
<%def name="docBrowser(is_embeddable=False)">
- <script src="/static/desktop/ext/js/bootstrap-fileupload.js" type="text/javascript" charset="utf-8"></script>
+ <script src="${ static('desktop/ext/js/bootstrap-fileupload.js') }" type="text/javascript" charset="utf-8"></script>
+ <script src="${ static('desktop/ext/js/jquery/plugins/jquery.hotkeys.js') }"></script>
<link rel="stylesheet" href="/static/desktop/ext/css/bootstrap-fileupload.css">
<style>
@@ -1051,6 +1052,13 @@ from desktop.views import _ko
});
}
});
+ $(window).bind('keydown', 'ctrl+a alt+a meta+a', function (e) {
+ self.activeEntry().entries().forEach(function (entry) {
+ entry.selected(true);
+ })
+ e.preventDefault();
+ return false;
+ });
}
ko.components.register('doc-browser', {
