[jifty-devel] Show/Hide region with effects

Wolfgang Kinkeldei wolfgang at kinkeldei.de
Fri May 4 03:39:10 EDT 2007

Am 03.05.2007 um 23:18 schrieb David Good:

> OK, I've given up on the combobox for now and have moved on to  
> something else.
> I implemented the example for showing and hiding a region in
> Jifty::Manual::PageRegions and then saw that I can add  
> Scriptaculous effects.
> However, when I tried to use BlindDown and BlindUp, if affects the  
> entire
> region, causing it to completely disappear when I click the "Hide"  
> link.  I've
> tried various things to work around it with no success.
> How am I supposed to do it?

there is currently no way to do that AFAIK. The reason is that the  
"onclick" handler consists of a series of JavaScript commands that  
are executed in a sequence. The effects, however, do use timers to  
provide their optical representation and immediately return to the  
caller which continues the sequence and fires the region-update  
without showing the effect in full length.

There would be a solution on the JavaScript side which would require  
to change the whole JavaScript logic in Jifty. I already thought on  
that in december:
> What I was breaking my head about the last few days: Is there an  
> elegant way of applying an effect _before_ doing an update to a  
> region? Technically this is not a problem, using the 'afterFinish'  
> hook of an effect to fire the region update. To allow this, there  
> would be a need to keep something like a TODO list inside the  
> "Jifty.update()" method that triggers its next item by a final hook  
> of the previous item. Everything concerning the same region would  
> have to run sequentially, different regions could run in parallel.

But, this is not a trivial task :-(


Wolfgang Kinkeldei


' /\_/\ ' .print[split??,"".(($/=q|Cms)+-03467:;<=|)=~tr!C-z -B! -z!)x
'( o.o )' .$/]->[hex]foreach split qr<>,qq+1ecd039ad65b025b8063475b+||
' > ^ < ' .q<!-- Wolfgang Kinkeldei - mailto:wolfgang at kinkeldei.de -->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070504/e7929763/smime.bin

More information about the jifty-devel mailing list