Massimo, I don't think it's dirty at all. Especially if the DIV could
be given a moveable target within the HTML layout AJAX style, like you
showed in another thread. It may not be immediately intuitive to the
novice user, but it seems to me that it's consistent with the
controller/viewer division of labor in web2py.

On Apr 19, 7:54 pm, mdipierro <[email protected]> wrote:
> We can do this:
>
> warn { background-color: yellow;color: black; padding: 5px; }
> .info { background-color: green;color: white; padding: 5px; }
> .error { background-color: red;color: white; padding: 5px; }
>  .flash{ margin: 0 auto; text-align: center; clear: both; border: 1px
> #000000; background-color: #FF5C1F;color: white; margin-top: 0.0em;
> margin-bottom: 1.0em; padding-top: 1.0em; padding-bottom: 1.0em;
> cursor: pointer; }
>
> def index():
>     response.flash=DIV("Hello World",_class='info')
>     return dict()
>
> But it looks ugly. Mind that it has to work decently even if one does
>
> def index():
>     response.flash="Hello World"
>     return dict()
>
> Any advice?
>
> Massimo
>
> On 19 Apr, 12:00, Iceberg <[email protected]> wrote:
>
>
>
> > Glad to have a happy ending of this story. :-)
>
> > On Apr19, 11:25pm, mdipierro <[email protected]> wrote:
>
> > > yes we can do that. I can include a warn, info and error in different
> > > colors.
>
> > > Massimo
>
> > > On Apr 19, 10:07 am, Yarko Tymciurak <[email protected]> wrote:
>
> > > > this seems like a nice approach...  one that separates concerns between
> > > > controller and view, and yet leaves things out of web2py, that is all 
> > > > to the
> > > > application...
> > > > Does it make sense to support this kind of convention by having default
> > > > classes in CSS?
>
> > > > On Sun, Apr 19, 2009 at 10:04 AM, mdipierro <[email protected]> 
> > > > wrote:
>
> > > > > BTW... one can also do
> > > > > response.flash=DIV("this is a message",_class="warn")
> > > > > and then declare a class "warn" in the CSS.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to