[Seaside] jQuery lightbox prompt
Robert Sirois
watchlala at hotmail.com
Mon Mar 1 14:09:13 UTC 2010
You don't have to create the dialog until you want to. Are you talking opening the dialog for the first time, or is this a persistent dialog that you want to update?
RS
Date: Mon, 1 Mar 2010 08:27:11 -0500
Subject: Re: [Seaside] jQuery lightbox prompt
From: bobn at rogers.com
To: seaside at lists.squeakfoundation.org
I assume that's the pattern from JQDialogFunctionalTest>>renderLightboxOn: ... but I'd like to do is to effectively defer the building of the scirpt: () code until the 'onClick: (html jQuery id: id) dialog open;' is triggered. I don't have enough context until then (domain state would determine the modal dialog component).
The jQuery lightbox example, as I understand it, sets up the lightbox component before the #onClick: script, since the script needs the component id. I'd like to create the lightbox component from within a #callback: ... just like the way SULightbox is used.
Thanks again, (and I keep thinking I'm missing something really obvious),Bob
On Fri, Feb 26, 2010 at 5:04 PM, Robert Sirois <watchlala at hotmail.com> wrote:
The way i do it is with a component, like BlahComponent which has something like:
renderContentOn: html
html div
script: (html jQuery dialog new) modal: true;
with: [...whatever...].
Sorry, writing this from memory. Anyway, i sort of template like that. Just return that to your page with ajax or whatever.
RS
Date: Fri, 26 Feb 2010 13:22:43 -0500
From: bobn at rogers.com
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] jQuery lightbox prompt
One more question about using a lightbox...
I use a lightbox to present prompts as a nice modal dialog from a callback.Is there a jQuery equivlanet?
A typtical use would be...
MyComponentSubclass>>renderContentOn: hmtl<...> callback: [ string := self somethingFromTheDomain.
answer := self prompt: string title: 'Testing'. self doSomethingWith: answer]
<...>
...using...
MyComponent>>prompt: aString title: aTitle ^self lightbox: (MyDialogPrompt prompt: aString title: aTitle
SULightbox works well with WAComponent>>show:onAnswer:delegation: which allows me to build the prompt string within the callback, but I can find no obvious jQuery equivalent.
The dialog examples, like JQDialogFunctionalTest>>renderLightboxOn: build the dialog content during rendering, which is too early.
I suspect it's a simple answer, but I just can't find it,
and I'd rather not code my own since it would probably be a redudent exercise.
BTW: I really like the ease with which jQuery can be used in Seaside; very cool.Replacing my SULightbox is the last bit I need to move my code entirely to jQuery.
Thanks for any help,Bob
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100301/4e93bf1e/attachment.htm
More information about the seaside
mailing list