[Seaside] jQuery lightbox prompt
Robert Sirois
watchlala at hotmail.com
Mon Mar 1 15:58:40 UTC 2010
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
Date: Mon, 1 Mar 2010 10:31:43 -0500
Subject: Re: [Seaside] jQuery lightbox prompt
From: bobn at rogers.com
To: seaside at lists.squeakfoundation.org
Guess I'm stuck on the "don't have to create the dialog until you want to".
I can always create a component as needed and #call: it from within a #callback: block.I'd just like to swap #call: with #lightbox: in some cases. With SULightbox that's easy enough to do.
But the jQuery example uses 'html submitButton onClick: (html jQuery id: id) dialog open' so the dialog being opened needs to already be created in order to provide the id. (I'm looking at JQDialogFunctionalTest>>renderLightboxOn:)
Is there a jQuery example that parallels the SULightboxTest>>renderContentOn: example?(where #inform: is overridden to render as a lightbox).
Or, to put it another way, is there a way to use lightbox behaviour for a component call with jQuery?
Thanks again,Bob
On Mon, Mar 1, 2010 at 9:09 AM, Robert Sirois <watchlala at hotmail.com> wrote:
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. Get it 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/2916eed7/attachment.htm
More information about the seaside
mailing list