[jifty-devel] Show/Hide region with effects

Jesse Vincent jesse at bestpractical.com
Mon May 7 08:57:07 EDT 2007

On May 4, 2007, at 3:39 AM, Wolfgang Kinkeldei wrote:

> 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?

To add effects to a section of the page that's _not_ a region, you  
likely want to just use the javascript library directly in your  
template. IE you don't want to blinddown/blindup the region but a  
singpel part of th reason

> 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.

I believe yves just contributed a 'beforeclick' handler into Jifty.

> But, this is not a trivial task :-(
> Regards,
> 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 -->
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070507/0da5e8c0/PGP.pgp

More information about the jifty-devel mailing list