[TASK] Add keyboard binding in install tool for all configuration search 82/46782/2
authorFrank Naegler <frank.naegler@typo3.org>
Fri, 19 Feb 2016 11:02:00 +0000 (12:02 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 19 Feb 2016 15:10:35 +0000 (16:10 +0100)
If the all configuration module is open and the new filter searchbox is available,
the keyboard shortcuts cmd+f / ctrl+f are used to focus the filter field.

Resolves: #73560
Releases: master, 7.6
Change-Id: Ifeb726819a3b7b1a3e03271be836d4b61aa85fa0
Reviewed-on: https://review.typo3.org/46782
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Resources/Public/JavaScript/Install.js

index a34d5a5..bfac527 100644 (file)
@@ -540,6 +540,19 @@ $(function() {
                $panels.collapse(action);
        });
 
+       if ($('#configSearch').length > 0) {
+               $(window).bind('keydown', function(event) {
+                       if (event.ctrlKey || event.metaKey) {
+                               switch (String.fromCharCode(event.which).toLowerCase()) {
+                                       case 'f':
+                                               event.preventDefault();
+                                               $('#configSearch').focus();
+                                               break;
+                               }
+                       }
+               });
+       }
+
        // Simple password strength indicator
        $('.t3-install-form-password-strength').on('keyup', function() {
                var value = $(this).val();