diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2022-01-14 21:40:03 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2022-01-14 21:40:50 +0100 |
commit | 143eb86de536e863170222617485c3e7f41d628a (patch) | |
tree | 75942f5731b9ee485afd077db04d0dfb8822f117 /help3xsl | |
parent | 1d958791300f4cf1eee8f26b46fe888cee3fae2e (diff) |
Related tdf#123318 Fix filtering with SHARED
Change-Id: Ic704b5ddcc0448a884da4ca01fa54bb94692495f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128423
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/help.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js index 6adbf2e17a..458c382dd9 100644 --- a/help3xsl/help.js +++ b/help3xsl/help.js @@ -52,15 +52,15 @@ function currentModule() { // We need to know the module that the user is using when they call for help var module = getQuery('DbPAR'); if (module == null) { - // get the module name from the URL and remove the first character, - // but first deal with snowflake Base + // first deal with snowflake Base if(url.indexOf('explorer/database/') !== -1) { module = 'BASE'; } else { - if (null === regexArray){// comes from search or elsewhere, no defined module in URL - module = 'HARED' + if (null === regexArray){ + // comes from search or elsewhere, no defined module in URL + module = 'SHARED' } else { - module = regexArray[1].toUpperCase().substring(1); + module = regexArray[1].toUpperCase(); } } } @@ -69,7 +69,7 @@ function currentModule() { function fullLinkify(indexEl, bookmarks, modules, currentModule) { var fullLinkified = ''; // if user is not on a shared category page, limit the index to the current module + shared - if(currentModule !== 'HARED') { + if(currentModule !== 'SHARED') { bookmarks = bookmarks.filter(function(obj) { return obj['app'] === currentModule || obj['app'] === 'SHARED'; }); @@ -114,7 +114,7 @@ function filter(indexList) { // Similarly to fullLinkify(), limit search results to the user's current module + shared // unless they're somehow not coming from a module. - if(userModule !== 'HARED') { + if(userModule !== 'SHARED') { resultModules = [userModule, 'SHARED']; } else { resultModules = modules; |