diff options
author | Reinhold Kainhofer <reinhold@kainhofer.com> | 2010-04-11 18:21:05 +0200 |
---|---|---|
committer | Graham Percival <graham@percival-music.ca> | 2010-05-28 11:40:56 +0100 |
commit | e80874f5c742381c834772cc13ca8c2fa115a712 (patch) | |
tree | a0435bd071bf69f16639484dcb3fdf5682e41766 /make | |
parent | 3720c7a19661ccec86ae05e0b6421620690ec4a2 (diff) |
Docs: Add AJAX search field to the docs
-) Add a search field to the toc pane in our docs. If the user types three
letters or more, an AJAX request is sent to the server to perform a
search. The AJAX part is implemented in JS, the search part itself is
implemented in PHP on the server side, which wades through a pre-generated
index file (pure text).
-) The texi2html init file now has the ability to create our own search
index file, currently in pure text (the search script will go through it
line for line.
-) The search box is shown via JavaScript only if the files are viewed over
http. If the user has JavaScript disabled or if the files are viewed as
static pages (and not over http), then no search box appears, since it
would not work anyway.
-) Also, don't show search box when AJAX initialization failed.
-) Print nice message if search index can't be opened, don't fail with error
-) Install and use language-dependent index files for all known languages
-) If we don't have a texinfo index, don't load the JS and don't print
out the search box. (Workaround: css_lines is called before
init_out, so we need to do the check already in css_lines!)
If the index would be empty, don't create an empty .idx file
-) If AJAX works and a user presses enter, the same AJAX query is triggered
as when entering some letters, and the results appear on the same page.
However, if for some reason AJAX does not work (in particular, if the
onSubmit action handler isn't called), then a search page is loaded
with the same results as the AJAX query...
Diffstat (limited to 'make')
-rw-r--r-- | make/doc-i18n-root-rules.make | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/make/doc-i18n-root-rules.make b/make/doc-i18n-root-rules.make index 13d3618fa4..2d9dec0304 100644 --- a/make/doc-i18n-root-rules.make +++ b/make/doc-i18n-root-rules.make @@ -38,6 +38,7 @@ $(outdir)/pictures: $(TRANSLATION_LILY_IMAGES): $(MASTER_TEXI_FILES) find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/$(outdir) + find $(outdir) \( -name '*.??.idx' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/$(outdir) touch $@ $(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi $(outdir)/weblinks.itexi |