Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Attrs on widgets composed of more than one HTML input
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Iwan  
View profile  
 More options Apr 20 2007, 8:54 am
From: Iwan <i...@reahl.org>
Date: Fri, 20 Apr 2007 05:54:23 -0700
Local: Fri, Apr 20 2007 8:54 am
Subject: Attrs on widgets composed of more than one HTML input
Hi there,

I have a question regarding, shall I say, policy regarding where
attributes are placed on widgets (and MultiWidgets) that are rendered
as more than one HTML input.

Should what's passed in attrs be put on the individual inputs, or on
one encapsulating element (such as a div or an ul).

My question is sparked by a problem we have with
newforms.widgets.RadioSelect.  Currently, it will render itself as a
<p>, followed by a <ul> of radio inputs (this is if you as_p on the
form):

<p><label for="id_x">Option:</label> </p>
<ul>
<li>
    <label>
        <input value="A" name="x" id="id_x_0" type="radio"> Option A
    </label>
</li>
<li>
    <label>
        <input value="B" name="x" id="id_x_1" type="radio"> Option B
    </label>
</li>
</ul>

We need to be able to add a stylesheet to set the list-style for that
list (so list items do not get bullets, which is otherwise the
default).

To do that we need to add a class attribute to the ul  (See ticket
#4080 - thought it to be a bug).  In the meantime, however, ticket
#3870 implemented things differently.

I need to know whether #3870 is correct (from a design perspective) in
its assumption that the args you pass to a widget should be applied to
all its "constituent parts"?  I think it makes more sense to give it a
div or something and apply the args to one conceptual thing...

One way or another, I'd like to know what changes we can suggest to
fix the problem of being able to style the ul of a RadioSelect...

Thanks
-i


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
~Kender  
View profile  
 More options Apr 22 2007, 2:55 am
From: ~Kender <pol...@gmail.com>
Date: Sat, 21 Apr 2007 23:55:04 -0700
Local: Sun, Apr 22 2007 2:55 am
Subject: Re: Attrs on widgets composed of more than one HTML input
Along this same line, there's another issue with the RadioSelect
widget.. It makes use of a rendering (returned by the render method)
but the class is hardcoded in the method, so there's no way to supply
an alternative renderer except to subclass both classes (the renderer,
and the RadioSelect widget). Being able to supply a new rendering
object would allow easier customization of the appearance of the
RadioSelect widget. Then it's just a matter of subclassing
RadioFieldRenderer and overriding the __unicode__ method.

Thanks,
Chad Simmons


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malcolm Tredinnick  
View profile  
 More options Apr 22 2007, 5:51 am
From: Malcolm Tredinnick <malc...@pointy-stick.com>
Date: Sun, 22 Apr 2007 19:51:23 +1000
Local: Sun, Apr 22 2007 5:51 am
Subject: Re: Attrs on widgets composed of more than one HTML input

On Sat, 2007-04-21 at 23:55 -0700, ~Kender wrote:
> Along this same line, there's another issue with the RadioSelect
> widget.. It makes use of a rendering (returned by the render method)
> but the class is hardcoded in the method, so there's no way to supply
> an alternative renderer except to subclass both classes (the renderer,
> and the RadioSelect widget). Being able to supply a new rendering
> object would allow easier customization of the appearance of the
> RadioSelect widget. Then it's just a matter of subclassing
> RadioFieldRenderer and overriding the __unicode__ method.

Please open a ticket in Trac for things like this. Bug reports and
enhancement requests on the mailing list are very easy to forget about.
Items in Trac don't get lost.

Thanks,
Malcolm


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »