lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AJAX-search field in the docs (Proof-of-concept)


From: Reinhold Kainhofer
Subject: Re: AJAX-search field in the docs (Proof-of-concept)
Date: Sat, 7 Mar 2009 12:25:00 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27-11-generic; KDE/4.2.0; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Samstag, 7. März 2009 00:47:30 John Mandereau wrote:
> Reinhold Kainhofer a écrit :
> > A few days ago, I decided it's finally time to learn what all that
> > hype about AJAX is about. What would be a better guinea pig than
> > trying to implement a seach box in our docs??? Well -- it turned out
> > incredibly easy. Here it is:
> > http://kainhofer.com/~lilypond/ajax/Documentation/user/lilypond-learning/
> >index.html (or any other manual there, like the NR or so)
>
> Excellent!
>
> > If JavaScript is disabled (so that AJAX won't work, either) or the files
> > are viewed as static files on your harddisk (i.e. not over http, so
> > the AJAX call would fail for sure), no search box is shown.
>
> It's certainly possible to enable the search for local docs by replacing
> AJAX calls with loading files locally.

Yes, that's possible in theory (simply using JavaScript to go through the 
index file line by line and match the search string, just like the .php file 
does). I'm not sure whether the JS will be blocking, though. If that's the 
case, I suppose we shouldn't implement search-as-you-type, but only search 
when you press enter...

> > The other problem is that the www-post script doesn't seem to install
> > the *.de.idx, *.ja.idx, *.fr.idx and *.es.idx files, while the *.en.idx
> > files are properly installed to Documentation/user/... So for now the
> > search only works in the English docs.
>
> The "culprit" is not www_post.py, it's the command that links translated
> doc files
> to Documentation/user in make/doc-i18n-user-targets.make.

Ah, so all I have to do is to add '*.idx' to the arguments of find and mass-
link them, too.

> > These search boxes are for now meant as a proof-of-concept
> > implementation mainly. I haven't done any work on the corresponding
> > CSS styling to make the results look nicer.
>
> I'm sure you'll push the implementation further to add it in our
> documentation :-)

Hehe, I was hoping that someone would jump up enthusiastically and say "Sure, 
I'll take on the polishing" ;)

Cheers,
Reinhold


- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJslmNTqjEwhXvPN0RAqKLAKC9hZ7Stqm0XXQVed/W/PCp9ugUqACgkqNq
EB/haQ7y9E26kiv+Kuw2iks=
=JVFg
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]