It works!

On Dec 26, 4:03 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> In trunk. Please check it.
>
> On Dec 25, 1:16 pm, "Ray (a.k.a. Iceberg)" <iceb...@21cn.com> wrote:
>
>
>
>
>
>
>
> > Here you are. And merry Chrismas!
>
> > diff -r 80b2c74561c0 gluon/sqlhtml.py--- a/gluon/sqlhtml.py     Mon Sep 26
> > 00:53:12 2011 -0500+++ b/gluon/sqlhtml.py       Mon Dec 26 03:14:58 2011
> > +0800
> > @@ -978,8 +978,8 @@
> >          elif type(self.formstyle) == type(lambda:None):
> >              table = TABLE()
> >              for id,a,b,c in xfields:
> > -                td_b = self.field_parent[id] = TD(b,_class='w2p_fw')
> > -                newrows = self.formstyle(id,a,td_b,c)
> > +                raw_b = self.field_parent[id] = b
> > +                newrows = self.formstyle(id,a,raw_b,c)
> >                  if type(newrows).__name__ != "tuple":
> >                      newrows = [newrows]
> >                  for newrow in newrows:
>
> > On Dec 26, 2:39 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> > wrote:
>
> > > I changed my mind about this and you are right. Can you send me a
> > > patch? I would like to see what you want to change it into.
>
> > > Massimo
>
> > > On Dec 24, 3:39 am, "Ray (a.k.a. Iceberg)" <iceb...@21cn.com> wrote:
>
> > > > Hi Massimo,
>
> > > > I just discovered the lovely formstyle=lambda ... feature. (http://
> > > > web2py.com/books/default/chapter/29/7?search=formstyle)
>
> > > > It saves me from the headache of css. However, it is strange that the
> > > > value of "field_widget" parameter is a TD instance. Should it better
> > > > be a raw widget instance?
>
> > > > Example. Right now I have to use the ugly ".comonents[0]" notation:
>
> > > >     crud.settings.formstyle = lambda record_id, field_label,
> > > > field_widget, field_comment: TR(
> > > >         field_label, DIV(field_widget.components[0], field_comment))
>
> > > > I prefer:
>
> > > >     crud.settings.formstyle = lambda record_id, field_label,
> > > > field_widget, field_comment: TR(
> > > >         field_label, DIV(field_widget, field_comment))
>
> > > > If you like this idea, tell me to open an issue to track its progress.
>
> > > > Regards,
> > > > Ray

Reply via email to