From a36c5fa052075746db9f0a937728a8df6c2c9079 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 21 Feb 2017 15:09:01 +0100 Subject: [PATCH 1/2] reveal sidebar when clicking the search icon --- js/sidebar.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/sidebar.js b/js/sidebar.js index f31bb75..fd2c9b2 100644 --- a/js/sidebar.js +++ b/js/sidebar.js @@ -135,10 +135,23 @@ jQuery(function () { }); }; + /** + * Show sidebar when accessing the search + */ + const initSearchToggling = function () { + jQuery('.toggleSearch').find('a').click(function (e) { + setDefaultContent(); + e.preventDefault(); + jQuery('#qsearch__in').focus(); + }); + + }; + // main initContentNav(); initSidebarToggling(); initMenuHandling(); initContentMinHeight(); + initSearchToggling(); }); From 95732eecdc1c5f970a9085f5cca78df2784aa872 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 21 Feb 2017 15:16:28 +0100 Subject: [PATCH 2/2] simplistic qsearch support This disabled the browser's own autocompletion, but every other position looks weird. --- css/area_sidebar-search.less | 6 ++++++ tpl/main-sidebar-search.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/css/area_sidebar-search.less b/css/area_sidebar-search.less index 48742e8..8c6f3f6 100755 --- a/css/area_sidebar-search.less +++ b/css/area_sidebar-search.less @@ -94,6 +94,12 @@ } } } + + #qsearch__out { + left: auto; + top: auto; + width: 100%; + } } .wide-content { .search.main-sidebar { diff --git a/tpl/main-sidebar-search.php b/tpl/main-sidebar-search.php index a9e3a47..6f180cd 100755 --- a/tpl/main-sidebar-search.php +++ b/tpl/main-sidebar-search.php @@ -3,4 +3,4 @@ echo '
'.tpl_getLang('head_quick_search').'
'; ?>

Zur Suche springen

- +