[Top][All Lists]

[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; ; )

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:
> >
> >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, 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" ;)


- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden,
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 *, DVR: 0005886
 * LilyPond, Music typesetting,
Version: GnuPG v1.4.9 (GNU/Linux)


reply via email to

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