Hi,
now I can update contents of other elements using update in Scriptaculous, I want to do more. Current lightbox: call does redraw all the page and draw the "box" over the page. But this is very slow if original page has many things. I wan to draw lightbox dialog without redraw all the page, that is, asynchronous lightbox is what I want to acheive. Can anyone provide me simple example code/idea on this? Thanks in advance. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Can anyone provide me simple example code/idea on this?
So you know how to update elements. And you have the source code of SULightbox that shows how to render a lightbox. Combining the two things is simple. Unfortunately it is not that simple to do in a generic fashion so that it can be used in any context with #call: and #answer:. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Chun, Sungjin
I have some questions;
1. updating is fill the content to the "already" rendered element, so, should I have to draw hidden area(div) for dialog before using dialog? 2. I already have some test for drawing transparent black area and dummy dialog but I cannot figure out closing or unmmap dialog/overlay. How can I do this? 3. Yes, as you said I cannot find way for call: answer: things. I think I can work around this using form in the dialog. Is this best way? Thank you in advance. ----- Original Message ----- From: Lukas Renggli <[hidden email]> To: [hidden email], Seaside - general discussion <[hidden email]> Sent: 07-10-11 20:20:13 Subject: Re: [Seaside] [Q] asynchronous lightbox > Can anyone provide me simple example code/idea on this? So you know how to update elements. And you have the source code of SULightbox that shows how to render a lightbox. Combining the two things is simple. Unfortunately it is not that simple to do in a generic fashion so that it can be used in any context with #call: and #answer:. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> 1. updating is fill the content to the "already" rendered
> element, so, should I have to draw hidden area(div) for dialog before > using dialog? You have to create an empty div on every page: <div id="lightbox"> </div> Using the updater you can fill it with something like this: <div id="lightbox"> <div id="overlay"></div> <div id="dialog">[ your dialog ]</div> </div> > 2. I already have some test for drawing transparent black area and dummy > dialog but I cannot figure out closing or unmmap dialog/overlay. How can I > do this? By emptying the div again: <div id="lightbox"> </div> > 3. Yes, as you said I cannot find way for call: answer: things. I think I can work > around this using form in the dialog. Is this best way? You might want to use an onAnswer: callback. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Chun, Sungjin
Hi,
here comes one more question; I've managed to copy some code like this; createActionDlgOn: canvas canvas updater id: 'box'; callback: [ :renderer | renderer div id: 'overlay'. renderer div id: 'lightbox'; style: 'display: none'; with: (NIMNextActionCreateComponent new) ] As you know this draws nothing, because I did not execute following script 'function updateLightbox() { Element.fullscreen("overlay"); Element.center("lightbox"); Element.show("lightbox"); };' How can I append/add this script to the above updater script? I've bindly added this using "," operation but this does not work. Thank you in advance. PS) I hope this kind of example be in the main scriptaculous package :-) _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |