[Seaside] jQuery lightbox prompt

Bob N. bobn at rogers.com
Fri Mar 5 16:15:30 UTC 2010


Robert,
Thanks, that's very helpful.

A couple of things: the #content component can't #answer: to return from the
call, and the component that issued the call does not get re-rendered after
the 'html jQuery new dialog close'.
But it's cleared up some things for me; I'll keep working on it.

Bob

On Fri, Mar 5, 2010 at 9:39 AM, Robert Sirois <watchlala at hotmail.com> wrote:

>  I'm finally at home and checking e-mail... imagine that. If I'm looking at
> the same method as you ("#lightbox:" on WAComponent), then what is happening
> is that a new component (an SULightbox) is being called and the page
> re-rendered. When you click "ok" (in the example) on the component within
> the dialog, it is answering true and causes another refresh, and goes away.
>
> Your root component renders the dialog, which renders its content. The
> components are just changing the way they render, and what it looks like,
> etc. They are calling that type of behavior delegation.
>
>
>
>
> You can do something similar to this with jQuery, there's just no
> convenience-like method for it.
>
> For example, on one of my websites I do can do something like this:
>
> html anchor
>     callback: [self call: (ToCDLightbox title: 'a title' content: WACounter
> new)];
>     with: 'Test lightbox call jQ'.
>
> where ToCDLightbox looks like:
>
> renderContentOn: html
>
>     html div
>         id: self id;
>         script: (html jQuery new dialog
>             title: self title;
>             autoOpen: true;
>             modal: true;
>             width: 'auto';
>             onClose: html jQuery this remove;
>             addButton: 'Done' do: html jQuery new dialog close
>         );
>         with: [
>
>             html render: self content.
>
>         ].
>
> This works ok for me, and you could expand on it. In another project of
> mine I'm working on a mutable UI type system based on dialogs, so there are
> quite a few more options on my dialog class.
>
> I'm far from proficient at any of this, so maybe Lukas or someone can point
> out some of my problems or explain this a little better, but I hope this
> helps.
>
> RS
>
> ------------------------------
> Date: Fri, 5 Mar 2010 08:04:26 -0500
>
> Subject: Re: [Seaside] jQuery lightbox prompt
> From: bobn at rogers.com
> To: seaside at lists.squeakfoundation.org
>
> Thanks for looking into it.
>
> So, if I understand things correctly, there is no equivalent to SULightobx
> in the Seaside jQuery code; no simple way to replace a #call: with
> #lightbox: ?
>
> Oh well, guess it's time to do some learnin' ... always did want to
> understand more about javascript and how Seaside generates it.  Now I just
> have to find the time ;-)
>
> Bob
>
>
> On Mon, Mar 1, 2010 at 10:58 AM, Robert Sirois <watchlala at hotmail.com>wrote:
>
> Im sorry im not very familiar with Scriptaculous. Ive been using a lot of
> ajax stuff to manipulate elements and return new information to the page
> without having to call and reload.
>
> It can be a pain keeping track of state, but if what youre doing is purely
> informational, then its not as big a deal.
>
> Sorry i cant be of more help.
>
> RS
> <...>
>
>
> ------------------------------
> Hotmail: Powerful Free email with security by Microsoft. Get it now.<http://clk.atdmt.com/GBL/go/201469230/direct/01/>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100305/9202335e/attachment-0001.htm


More information about the seaside mailing list