From 995c204428dd6be04d2bff1d5e17f3e95268f44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 18 Nov 2016 19:21:31 +0100 Subject: Added shortcut --- app/Resources/static/themes/baggy/js/shortcuts/main.js | 7 +++++++ app/Resources/static/themes/material/js/shortcuts/main.js | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'app/Resources/static/themes') diff --git a/app/Resources/static/themes/baggy/js/shortcuts/main.js b/app/Resources/static/themes/baggy/js/shortcuts/main.js index e69de29b..aed09aee 100644 --- a/app/Resources/static/themes/baggy/js/shortcuts/main.js +++ b/app/Resources/static/themes/baggy/js/shortcuts/main.js @@ -0,0 +1,7 @@ +$(document).ready(() => { + Mousetrap.bind('s', () => { + $('#search').trigger('click'); + $('#search_entry_term').focus(); + return false; + }); +}); diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js index 8514f71e..ad4ca80a 100644 --- a/app/Resources/static/themes/material/js/shortcuts/main.js +++ b/app/Resources/static/themes/material/js/shortcuts/main.js @@ -30,6 +30,12 @@ $(document).ready(() => { /* Actions */ Mousetrap.bind('g n', () => { $('#nav-btn-add').trigger('click'); + return false; + }); + + Mousetrap.bind('s', () => { + $('#nav-btn-search').trigger('click'); + return false; }); Mousetrap.bind('esc', () => { -- cgit v1.2.3