summaryrefslogtreecommitdiffstats
path: root/help3xsl/help.js
diff options
context:
space:
mode:
authorGabriel Chiquini <gabrielchiquini@hotmail.com>2017-11-17 10:46:39 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2017-11-29 21:37:26 +0100
commitec6a05cc524a17ff090eaa7e506d7b5452ab227b (patch)
tree95fd11673efe9298cbe32294dc4a32b1dad7e5dd /help3xsl/help.js
parentReplace cp -rap with cp -a, satisfying all *nixes. (diff)
downloadhelp-ec6a05cc524a17ff090eaa7e506d7b5452ab227b.tar.gz
help-ec6a05cc524a17ff090eaa7e506d7b5452ab227b.zip
Fixed UX bugs
Clicking on tabs (Contents, Field, Index) now close the other ones Set focus into seach field clicking in those tabs Change-Id: I4b569aea86d4c5c441ce89dfa76f66844f0ebbc4 Reviewed-on: https://gerrit.libreoffice.org/44902 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/help.js')
-rw-r--r--help3xsl/help.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js
index ba7a4523b4..2c230e91e8 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -109,5 +109,22 @@ $(document).ready(function() {
}
}, 200);
});
+
+ //maintain only one panel open
+ $('input[name="accordion-menu"]').on('change', function(){
+ $('input[name="accordion-menu"]').not(this).prop('checked', false);
+ });
+ //focus Google Search input clicking on Find panel
+ $('#accordion-2').on('change', function(){
+ if($(this).is(':checked')){
+ $('#gsc-i-id1').focus();
+ }
+ });
+ //focus index search input clicking on Index panel
+ $('#accordion-3').on('change', function(){
+ if($(this).is(':checked')){
+ $('#search-bar').focus();
+ }
+ });
});
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */