summaryrefslogtreecommitdiff
path: root/help3xsl/help.js
AgeCommit message (Collapse)Author
2021-11-05Close navigation menus when clicking outside themIlmari Lauhakangas
Change-Id: I6d567d7978ed5997b4ca9bf865e9e54d6c67a3a0 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/124718 Tested-by: Jenkins Reviewed-by: Ross Johnson <ross.johnson@homemail.com.au> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-10-01tdf#123506 - focus search results to user's current moduleRoss Johnson
This change focuses the search results on the module the user initially called help from and in addition, in the same way that the initial index is presented, limits the results to that module plus GLOBAL results. Explanation: Currently, when a user arrives at a help page from a module they begin with a blank search term and by default the index is focused on the module they came from. As they enter a search term the results from ALL modules are presented, paginated and either, (7.3 current) grouped by modules but in a fixed order of modules that often pushes results relative to the user's module off the first page of the index or, (7.2 and earlier) pseudo randomly with incorrect grouping under modules. If a user wishes to explor other module results they can choose a module from the Modules drop down. Their search term remains and they can easily search again. Change-Id: Ib10dd55d1c68a839938842fe3607a7a7619b3538 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/122903 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2021-09-26Switch from Fuzzysort to FlexSearchIlmari Lauhakangas
FlexSearch has the best performance of JS search libs at the moment. It doesn't have fuzzy search yet, but maybe our users don't even want the feature. RFE is https://github.com/nextapps-de/flexsearch/issues/118 flexsearch.debug.js is used because it is the only unminified version and we can't use minified files in the source code as they are equivalent to binary files (close source). There doesn't seem to be anything that would make it a bad idea to use the debug version in production, only a couple of edge case checks that print warnings to console. This commit also makes automatic filtering work when the input field already has a string upon page load (functions were called in the wrong order). Change-Id: I5055f7f7f99cad92dfa3a544e5314eb85a1faced Reviewed-on: https://gerrit.libreoffice.org/c/help/+/122566 Tested-by: Jenkins Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-09-20tdf#123506 - HTML Help pages - group search results under module headingsRoss Johnson
The "double entries" reported are because the search results are never grouped according to module (CALC, WRITER, IMPRESS, etc). Results are now grouped. The HTML Help page search function uses a "fuzzy" algorithm to pick matching results. This observation by the reporter is not a bug and so the main Help page has been updated to include an explanation. The main Help page has also been updated to draw attention to the highlighing of the matching characters from the search term, to show exactly how the match was made. Change-Id: Ibdb9ac726b36b9dd6f605c854192ec644bfe09e1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/122312 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-03-05Reorganise and refactor stuff in help.js for readabilityIlmari Lauhakangas
Change-Id: Ife1b412350be5ac046736312ff9216273eff281b Reviewed-on: https://gerrit.libreoffice.org/c/help/+/89973 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2020-01-30tdf#127566: don't change divcopyable border width in onclick handlerMike Kaganski
Instead, define border width in respective CSS, to make it consistent in both clicked and non-clicked states, and avoid "jumping" on click. Change-Id: Ic8ab8d0fd586059e21de6aa866fef95226774acf Reviewed-on: https://gerrit.libreoffice.org/c/help/+/87718 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-10-14More work on Xapian result pageOlivier Hallot
Added module dropdown fix TODO: Language Change-Id: I47012d6280694d87fb5d19e25c6052b8a7ed89c7 Reviewed-on: https://gerrit.libreoffice.org/80771 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-05-02tdf#122366 Store search filter value in sessionStorageIlmari Lauhakangas
sessionStorage seems to be reset, when we change the module context. If this is not acceptable, we can try localStorage. Change-Id: I5ec2ff526e48dd2c7d1889578e991833e43f76c6 Reviewed-on: https://gerrit.libreoffice.org/71688 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-04-29Limit the scope of getting class names for index titlesIlmari Lauhakangas
Change-Id: I2d586605118032aaf38ff70d420bc7c2bf4979ae Reviewed-on: https://gerrit.libreoffice.org/71529 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-04-26tdf#122548 copy bascode and pycode to clipboardOlivier Hallot
This will allow easy testing of coding examples. Change-Id: I30fc53642b1579744591f2de0c84a615d1755352 Reviewed-on: https://gerrit.libreoffice.org/71385 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-03-27tdf#124245 Polyfills and fixes for IE11Ilmari Lauhakangas
The polyfills can be removed after we drop IE11 support. Other IE11 fixes: Change from document.URL to window.location.pathname because otherwise we get local Windows paths with backward slashes. Use clear: left; for google-donation element so it doesn't float on top of other elements. Don't use defer to load fuzzysort.js and prism.js. Change-Id: I6c0143eab555c8b1fbdbde8e749a24baed2f69c8 Reviewed-on: https://gerrit.libreoffice.org/69549 Tested-by: Jenkins Reviewed-by: himajin100000 <himajin100000@gmail.com> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-22Stop index headers from being linkifiedIlmari Lauhakangas
Change-Id: If445b693feb17fd943eced3a222a20b26039891d Reviewed-on: https://gerrit.libreoffice.org/63759 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-20tdf#119415 Add placeholder text for index filterIlmari Lauhakangas
Change-Id: If7a0a863eb6b8bb95a5b6236f4f3d490739810a1 Reviewed-on: https://gerrit.libreoffice.org/63672 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-11-11Fixed some silliness, added highlighting for index filterIlmari Lauhakangas
Change-Id: I946ffdb52ed8f324ab58f45a90f5decdd58932dc Reviewed-on: https://gerrit.libreoffice.org/63240 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-09tdf#119415 change from fuse.js to fuzzysort.jsIlmari Lauhakangas
Tied the index listing to the current module. Fuzzysort.js is MIT licensed. Change-Id: I5d95cc1870a1856089217846ed0af572abc882d7 Reviewed-on: https://gerrit.libreoffice.org/63203 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-04-17Fix index in sidebarOlivier Hallot
The last commit of online_transform.xsl instrpduced a bug in index search on the left. This one fixes it. Change-Id: I8055389a324d1fc5fde90ac2b76ff6f0a4a42493 Reviewed-on: https://gerrit.libreoffice.org/53011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-04-16tdf#116150 Review XHP <switch> style transformOlivier Hallot
implement <switch> and <switchinline> with HTML and Javascript, for 'sys' and 'appl'. Change-Id: I6056e787146bb92617c2ce639acab16d16d6f765 Reviewed-on: https://gerrit.libreoffice.org/52929 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-03-22Add vnd.oasis.opendocument.* objects in new helpOlivier Hallot
Add capability to link ODF files in help page as objects Files are stored in media/files/ folder Example in func_imsin.xhp Change-Id: I4704e3cc235fd31251f3a4dba403e62f2ef1de0e Reviewed-on: https://gerrit.libreoffice.org/51721 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-03-03tdf#116150 Fix logic for case/caseinline with 'sys'Olivier Hallot
Change-Id: I5c9cb270fa89ea5281355fc80be2a155b9d9ef9e Reviewed-on: https://gerrit.libreoffice.org/50650 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-02-09Tweaked contents expansionIlmari Lauhakangas
Stopped excluding main items. Highlighted current item. Harmonised the help.js indentation. Change-Id: I6b8f22940d077d008662a387071a5d5db04409f7 Reviewed-on: https://gerrit.libreoffice.org/49488 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-02-08tdf#115255 and auto-expand contents per subitemIlmari Lauhakangas
JavaScript stuff moved from online_transform.xsl to help.js. Simplified bookmarks markup. Span elements with class "input" and length more than 3 characters can be copied to clipboard by mouse click. Bubli's feature request for auto-expanding contents per subitem is also implemented. Logic for adding headings to index list was reimplemented. Change-Id: I87b6f189a040a73a1ab9dda1ec9cd790b06da202 Reviewed-on: https://gerrit.libreoffice.org/49421 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-01-23Use list.js for Index listing and searchIlmari Lauhakangas
List.js - http://listjs.com/ - allows us to paginate the results so the height does not get out of hand. Fuzzy search would be cool: http://listjs.com/docs/fuzzysearch/ ...but it gives too big of a perf hit with our 5700 items. Might try to bribe the creator to look into perf. Thanks a lot to David Tardon for the makefile solution and to Christian Lohmaier for playing a rubber duck. Change-Id: I359eed541470ccaa309b0b6ff5d809a796d9befd Reviewed-on: https://gerrit.libreoffice.org/48335 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-01-05Fix typosAndrea Gelmini
Change-Id: Ie3e0490e8ca41f9d4f20b834a3d5865c0fb18ad7 Reviewed-on: https://gerrit.libreoffice.org/47480 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-01-05Switched to a sidebar layout. Art direction by Andreas KainzIlmari Lauhakangas
Markup and JS got simpler, layout got more robust. Change-Id: Ia74489038e7d11b632ea2b6ca6efe0d90dfe5181 Reviewed-on: https://gerrit.libreoffice.org/47441 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-01-03Fix typosAndrea Gelmini
Change-Id: I7ef82f8d2896f3687be1aacfd08b8cf0d0d6e105 Reviewed-on: https://gerrit.libreoffice.org/47273 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-12-29tdf#114709, tdf#112758, tdf#112757Ilmari Lauhakangas
Lots of changes and tweaks. Header and footer now span 100% width even on desktop. Font sizes were increased and content area made narrower. We now have two separate language menus so the menu is always visible on mobile. Google search moved out of the accordion panel. Accordion panel colours made darker. On desktop, expanded accordion panels overlap content. Change-Id: I976a67b1ca0cb2d21f0569da8d1fefd2b589d7d3 Reviewed-on: https://gerrit.libreoffice.org/47139 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2017-12-16Fixed remaining index search bugsGabriel Chiquini
Show list only after typing 3 or more characters Hide labels when module results is empty Change-Id: Ifb7a255b6ac627a0448878df104e837d96074fce Reviewed-on: https://gerrit.libreoffice.org/46134 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2017-11-29Fixed UX bugsGabriel Chiquini
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>
2017-10-03tdf#112370 Add case-insensitive support to index searchgabrielchiquini
Change-Id: I460f853f4abd6bf8124f2b6d01d5b771fcc6569c Reviewed-on: https://gerrit.libreoffice.org/42984 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2017-09-02Add localization to helponline UIOlivier Hallot
* Add support for localization in helponline UI. + translate 4 words + prepare for focused google search * Tweak the index search, open search index for all modules. Change-Id: Id7ad4fd63fe1f9d1334fb65febdee6f60c24361a Reviewed-on: https://gerrit.libreoffice.org/41839 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-08-02tdf#97745 Handle offline browser helpOlivier Hallot
* Rename index.html to LOHelp.html. index.html is a bad name, too generic. LOHelp.html is invoked by LibreOffice and is not a popular file name. * Clean the XSLT transform, add suport for local help. * reposition bookmark2file.js in the target tree. * remove obsolete files * page tree now capable to be opened by file:// protocol, passing 'online' parameter and folder address to the bash script. Change-Id: I2cf9f69de7896bd74074745993ef033bef5c3503 Reviewed-on: https://gerrit.libreoffice.org/40661 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-07-23tdf#97745 code cleanupOlivier Hallot
* Add debug param, to display page info in the bottom &Debug={0|1} Change-Id: I809548e5d59d0a55b258ca0ec69811efec51df67 Reviewed-on: https://gerrit.libreoffice.org/40341 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-07-11Help-in-browser (vii) more improvementsOlivier Hallot
see it in http://helponline.libreoffice.org Added mos keywords from schema.org New, responsive page design Change-Id: I9df963c1a962c0fbb5c2926d8066b31cd20d485b Reviewed-on: https://gerrit.libreoffice.org/39822 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-06-26Help-in-browser (v)Olivier Hallot
* Add piwik analysis * handle SHARED module in search Change-Id: I7c3c653d5e1211eed6c45b521fc35a9dc52ed21e Reviewed-on: https://gerrit.libreoffice.org/39251 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2017-06-25Help-in-browser: several improvementsOlivier Hallot
* tabs for Contents/Index/Search * product version (6.0, 5.3, 5.2, etc...) * capable to receive URL from LibreOffice help call (need to change help url in sfx2/: protocol://<host>/index.html?<params> Change-Id: I2244336ea47cdb923884ae97b9f4a586d85ec706 Reviewed-on: https://gerrit.libreoffice.org/39227 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2016-11-07Move the JavaScript pieces directly to 'source'.Jan Holesovsky
This avoids problems with tryint to access stuff via '..'.
2016-11-07Reformat for readability + add modelines.Jan Holesovsky
2016-10-25Mozilla Public License added in edited filesFabio Biocchetti
Mozilla Public License added in headers Change-Id: I803d84fbff43913198929a56b57c668d14b6a9eb Reviewed-on: https://gerrit.libreoffice.org/30269 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2016-10-24Fix comments in script and JavaScript refactor.Fabio Biocchetti
Comments correction in shell script Introduced js debouncer for search bar xml-stylesheet tag removed Introduced parameter passing through pages Links in XHP pages now work with js Minor adjustments Change-Id: Ibf5f7a74c3249fa6f1ff4d3037fe821797e88d1d Reviewed-on: https://gerrit.libreoffice.org/30231 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
2016-10-21tdf#97745 Help pages in browser (WIP)Fabio Bioccetti
Work in progress: Search index Javascript xhp server patch2: rename jj.js to help.js updated index.html accordingly Change-Id: Idece5ea25b0906b3fbdfd1f401e8dcfdfa4bd947 Reviewed-on: https://gerrit.libreoffice.org/30143 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>