diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2018-01-22 16:48:08 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-01-23 12:03:49 +0100 |
commit | 995f740adfff22aff1105a7e1b2801dfdab43434 (patch) | |
tree | b130ea7c62f69430fb97df90fb5b6bf40784645c /CustomTarget_html.mk | |
parent | d8623712ce8523cd6d29116a5bd903e1d7edbd62 (diff) |
Use list.js for Index listing and search
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>
Diffstat (limited to 'CustomTarget_html.mk')
-rw-r--r-- | CustomTarget_html.mk | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index 85ae29b2a5..0c71db2551 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -12,7 +12,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,helpcontent2/help3xsl)) # HACK!! html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw -html_BMARK_MODULES := scalc:CALC schart:CHART swriter:WRITER sdraw:DRAW simpress:IMPRESS smath:MATH sbasic:BASIC shared:SHARED shared/explorer/database:BASE +html_BMARK_MODULES := swriter:writer scalc:calc simpress:impress sdraw:draw shared/explorer/database:base smath:math schart:chart sbasic:basic shared:shared $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\ hid2file.js \ @@ -113,7 +113,11 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js : $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2) $(call gb_Helper_abbreviate_dirs,\ - cat $(filter %.part,$^) > $@ \ + ( \ + echo 'document.getElementById("Bookmarks").getElementsByClassName( "list" )[0].innerHTML='"'"'\' \ + && cat $(filter %.part,$^) \ + && echo "'" \ + ) > $@ \ ) define html__gen_bookmarks_lang_dep @@ -150,11 +154,10 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1) $(call gb_Helper_abbreviate_dirs,\ ( \ - echo "document.getElementById(\"bookmark$(APP)\").innerHTML='\\" \ - && find $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR) -name "*.xhp" \ - | while read xhp; do \ - $(call gb_ExternalExecutable_get_command,xsltproc) \ - --stringparam app $(APP) \ + find $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR) -name "*.xhp" \ + | while read xhp; do \ + $(call gb_ExternalExecutable_get_command,xsltproc) \ + --stringparam app $(APP) \ --stringparam Language $(HELP_LANG) \ --stringparam productversion $(PRODUCTVERSION) \ $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \ @@ -162,8 +165,7 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \ ; done \ | sort -k3b -t\> -s \ | awk 'NF' \ - && echo "'" \ ) > $@ \ - ) + ) # vim: set noet sw=4 ts=4: |