[Trac] 'Spoiler' tag

2010-11-29 Thread Сикорский Сергей

Hi.

Is there any way to 'fold' some text on a page to one clickable line, like it 
'spoiler' tag does on some sites?

It would be useful to hide lots of pictures, for example.

--
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] 'Spoiler' tag

2010-11-29 Thread David Chase

On 2010-11-29, at 7:35 AM, Сикорский Сергей wrote:

 Hi.
 
 Is there any way to 'fold' some text on a page to one clickable line, like it 
 'spoiler' tag does on some sites?
 
 It would be useful to hide lots of pictures, for example.

We have a plugin on our site, that uses a dab of Javascript for something like 
this.
I don't know the exact details.  It's generated by the plugin and inserted 
inline.

Look here, try clicking on the Show ASCII Show Rendered buttons.
The source for the page shows the Javascript.
This has been tweaked to work properly with browsers that don't have Javascript 
turned on,
again unsure of the details.

http://projectfortress.sun.com/Projects/Community/wiki/Fibonacci

If you like what you see, the plugin source is here, and you can tinker with 
it.  It's supposed to be BSD copyrighted, though I see it lacks a notice, which 
means there may be a new version up sometime soon.

http://projectfortress.sun.com/Projects/AboutThisInstallation/browser/trunk/macros/fss.py

The HTML/rendered section of the plugin is pretty obvious; you might want to 
avoid the bit about maintaining an image cache, and running emacs, pdflatex, 
and ghostscript in subprocesses.

hope this helps,

David

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.