WebHelpers 0.6.3 has been released.
* Bugfix in distribute() found by Randy Syring.
* New helpers title() and required_legend() in webhelpers.html.tags.
* New directory webhelpers/public for static files
* Suggested stylesheet webhelpers/public/stylesheets/webhelpers.css
(You'll have to manually add this to your application.)
It does not have the format_size helper discussed today because that
hasn't stabilized yet.
Over the weekend I found a partial solution to the field helper problem.
h.title(title, required, label_for=None)
This encapsulates the repetitive part of generating a field title
without getting into how the fields are arranged (in <div>s or a table
or a <dl>). If ``label_for`` is present, it generates a <label>
around the title; if not, it doesn't.
Required fields get a "*" after the title using CSS class
"required-symbol". Additionally, the entire title gets a "required"
or "not-required" span around it. The suggested stylesheet makes
"required-symbol" bold red, "required" bold, and "not-required"
normal. You can adjust these as you wish; e.g., some sites want
non-required titles bold too.
required_legend() simply outputs a "* = required" span to place
wherever you want on the form. The star in the "required
required-symbol" classes to match the other stars.
We've been talking about a WebHelpers stylesheet and public directory
for several months, so now there is one. That's where the Javascript
helpers would have gone if they'd been implemented now. Someday we
may add some common images (arrows and the like) which could go there.
You can either copy the styles to your own stylesheet, or copy the
sheet and use @import, or set up Cascade in middleware.py with
@import. Or ignore them if you don't like them.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---