[Libreoffice-commits] help.git: help3xsl/help.js

gabrielchiquini gabrielchiquini at hotmail.com
Tue Oct 3 10:50:08 UTC 2017


 help3xsl/help.js |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 507d26615775cc233413cbb140dd3e7ccf971567
Author: gabrielchiquini <gabrielchiquini at hotmail.com>
Date:   Sat Sep 30 23:48:29 2017 -0300

    tdf#112370 Add case-insensitive support to index search
    
    Change-Id: I460f853f4abd6bf8124f2b6d01d5b771fcc6569c
    Reviewed-on: https://gerrit.libreoffice.org/42984
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/help.js b/help3xsl/help.js
index e576cb54b..ba7a4523b 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -98,8 +98,11 @@ $(document).ready(function() {
         }
         debouncer = setTimeout(function(){
             if ($('#search-bar').val()) {
-                $("#Index ul a:not(:contains('" + $('#search-bar').val() + "'))" ).parent().hide();
-                $("#Index ul a:contains('" + $('#search-bar').val() + "')" ).parent().show();
+                var toShow = $('#Index ul a').filter(function(){
+                    return $(this).text().toLowerCase().indexOf($('#search-bar').val().toLowerCase()) > -1;
+                });
+                toShow.parent().show();
+                $("#Index ul a").not(toShow).parent().hide();
             }
             else {
                 $("#Index ul li" ).show();


More information about the Libreoffice-commits mailing list