Gracefully Degrading Lightbox from Command Column
Joel Turnbull
joel at ardishealth.com
Thu Oct 1 18:45:13 MEST 2009
Ok well I'm not necessarily tied to lightbox, I just thought it would be
cool. I've been playing with something like this instead.
renderCellLinkContent: aFoo on: html
self commands
do: [ :each |
html submitButton
onClick: 'confirm(''Are you sure you wish to remove', aFoo
name,'?''); return false';
callback: [ each key value: aFoo ];
with: each value ]
separatedBy: [ html space ]
The callback does the WAComponent confirm:.
So this degrades well, my only problem is, I don't know how to get the
result of the js dialog it and call removeFoo: aFoo if it's true.
Joel
On Thu, Oct 1, 2009 at 12:17 PM, Lukas Renggli <renggli at gmail.com> wrote:
> >> The point is that the light-box does not use Javascript (AJAX) to get
> >> it displayed, so it will generate the HTML either way. JavaScript is
> >> only used afterwards to get the dialog centered in the middle of the
> >> page and have the background dimmed. I haven't seen a lightbox yet
> >> that can do this cross-browser only using CSS.
> >
> > How would a lightbox get displayed without using js?
> > You have to do something to get the lightbox to display,
> > that something requires javascript to happen.
>
> No. #lightbox: is like #call:. It does a full refresh to the server
> and generates a completely new page with the background and lightbox
> HTML. The only difference between #call: and #lightbox: is that call
> does not render the parent component, #lightbox: does to make it shine
> through using some CSS effects. You can easily observe that in
> FireBug.
>
> Now of course there are nicer ways to do a lightbox, e.g. by loading
> the dialog using an AJAX call. However this does not work as part of a
> flow and requires you to write and adapt some Javascript code to work
> with your page layout.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20091001/976a9295/attachment-0001.html>
More information about the smallwiki
mailing list