[Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
               Reporter:  Mark       |          Owner:  nobody
  Phillips                           |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  2.0
  Uncategorized                      |       Keywords:
               Severity:  Normal     |  FilteredSelectMultiple widget
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 If the label for the FilteredSelectMultiple has a space in it, the
 controls for moving data between the boxes are not activated. The widget
 still works if one double clicks on the elements in the left box, they
 move to the right box. But the arrows don't work. Tested on Chrome
 67.0.3396.62 (Official Build) (64-bit) and Firefox 60.0.1 (64-bit) using
 runserver to run my django code.

 Take a look at the attached image first.png. There are two
 FilteredSelectMultiple widgets, one called Pets and one called Pet Names.
 Note that in the widget Pet Names, the controls are not highlighted, but
 the controls in the Pets widget are highlighted.

 Take a look at the attached image second.png. The only change to the code
 was to change the Pet Names label to Pet_Names (ie replaced the space
 between Pet and Names with an underscore Pet Names -> Pet_Names). Now the
 controls are working.

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/049.d59fe3006850ebc7331352d32841c464%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Uncategorized        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "first.png" added.

 Screen shot showing a FilteredSelectMultiple widget with a space in the
 label and the controls not working.

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.d3a43901295ae54e799f5ced7f41a505%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Uncategorized        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "second.png" added.

 Screen shot showing a FilteredSelectMultiple widget without a space in the
 label and the controls are working.

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.29815541149b73cc8470f2b9c8270615%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Uncategorized        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Mark Phillips:

Old description:

> If the label for the FilteredSelectMultiple has a space in it, the
> controls for moving data between the boxes are not activated. The widget
> still works if one double clicks on the elements in the left box, they
> move to the right box. But the arrows don't work. Tested on Chrome
> 67.0.3396.62 (Official Build) (64-bit) and Firefox 60.0.1 (64-bit) using
> runserver to run my django code.
>
> Take a look at the attached image first.png. There are two
> FilteredSelectMultiple widgets, one called Pets and one called Pet Names.
> Note that in the widget Pet Names, the controls are not highlighted, but
> the controls in the Pets widget are highlighted.
>
> Take a look at the attached image second.png. The only change to the code
> was to change the Pet Names label to Pet_Names (ie replaced the space
> between Pet and Names with an underscore Pet Names -> Pet_Names). Now the
> controls are working.
New description:

 If the label for the FilteredSelectMultiple has a space in it, the
 controls for moving data between the boxes are not activated. The widget
 still works if one double clicks on the elements in the left box, they
 move to the right box. But the arrows don't work. Tested on Chrome
 67.0.3396.62 (Official Build) (64-bit) and Firefox 60.0.1 (64-bit) using
 runserver to run my django code.

 Take a look at the attached image first.png. There are two
 FilteredSelectMultiple widgets, one called Pets and one called Pet Names.
 Note that in the widget Pet Names, the controls are not highlighted, but
 the controls in the Pets widget are highlighted.

 Take a look at the attached image second.png. The only change to the code
 was to change the Pet Names label to Pet_Names (ie replaced the space
 between Pet and Names with an underscore Pet Names -> Pet_Names). Now the
 controls are working.

 Mark

--

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.94f52a05476439a128654afdd8a34a04%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * component:  Uncategorized => contrib.admin


Comment:

 I'm not sure that a space in the label is the issue. For example, I
 couldn't reproduce the problem with "Available user permissions" on the
 change user page. Could you debug a bit further and confirm the source of
 the problem?

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.07792bdf5eb5d93631c02afe0d17b7d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 I am happy to help debug this issue. I am not sure where to start or how
 to proceed. Any suggestions as to a plan of attack would be very helpful!

 Replying to [comment:2 Tim Graham]:
 > I'm not sure that a space in the label is the issue. For example, I
 couldn't reproduce the problem with "Available user permissions" on the
 change user page. Could you debug a bit further and confirm the source of
 the problem?

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.b1844bd59167404affb1507193997f0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

 I would try some JavaScript debugging in
 `django/contrib/admin/static/admin/js/SelectFilter2.js`.

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.88dc8c5c882d6e37edfcc164f97c8fde%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * cc: Carlton Gibson (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.140a7df5d9591240f027d5ef091f8793%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 Tim,

 I am not a Javascript guy, but I did manage to get this far - perhaps it
 will help.

 In SelectFilter2.js, I tracked what was going on to the line where it is
 going to toggle the add link on (see picture A). When I step through the
 code using the widget named Pets and selecting an element, I get to
 picture B in the bowels of the jQuery code. You will note that "match = 3"
 for this control. When I step through the same code, but select an element
 in Pet Names, I get to the same place, but now match = null (picture C).
 From here, the program goes in different directions, and not being a js
 guy, I am a little lost.

 I hope this helps!

 Mark

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.0d7295246747f17a9e4febac939c0ffd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 Tim,

 I can't upload the three images because the tracker thinks they are spam.

 Mark

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.bcdc90d3bc125ec0ef95f09ba1b8cad3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "Javascrpt debugging A.png" added.

 Javascript debugging A

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.2c2e324dd4349f590470a3b8b6a1b145%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "Javascript debugging B.png" added.

 Javascript debugging B

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.4532f92cbb024f5923c5b8f7adf6b27e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "Javascript debugging C.png" added.

 Javascript debugging C

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.19cf6d38f9c1d17a88ceb840bbebfb6d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 Finally found a file name that was not considered spam.....

 Mark

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.424e519c1c6c26aa281dd9e3bd98c288%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

 Can you provide a sample project with the minimal code needed to reproduce
 the issue?

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.aef8255c632f483cb743c9b9b95193d3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 Tim,

 The project is rather large. I can try to trim it down, but I am in the
 middle of fixing other bugs right now. In what form and how should I send
 you the trimmed down project?

 Mark

 PS Sorry for my newbieness...;)

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.c1c3ba0c8ee0b82f67697183bc67c092%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
                                     |  worksforme
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 You can attach a file on the ticket or put the minimal project on GitHub.
 I tried this but could not reproduce the problem:
 {{{
 from django.db import models


 class Pet(models.Model):
     name = models.CharField(max_length=20)

     def __str__(self):
         return self.name

 class PetName(models.Model):
     name = models.CharField(max_length=20)

     def __str__(self):
         return self.name

 class Whatever(models.Model):
     pets = models.ManyToManyField(Pet)
     pet_names = models.ManyToManyField(PetName)
 }}}
 {{{
 from django.contrib import admin

 from .models import Pet, PetName, Whatever

 admin.site.register((Pet, PetName))
 admin.site.register(Whatever, filter_horizontal=['pets', 'pet_names'])
 }}}
 The widget says, "Available pet names".

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.84d550ccee99d621fc6d173b2af46620%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
                                     |  worksforme
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mark Phillips):

 Tim,

 After looking at your example, I see I did a bad job of explaining the
 bug.  In my program, I create the fields for the adminForm on the fly
 because the fields are not defined until run time. I have these lines of
 code:


 {{{
 class MetaDataNames(models.Model):
     meta_name_id = models.AutoField(primary_key = True)
     name = models.CharField(max_length=200, unique=True)

 class MetaDataValues(models.Model):
     meta_value_id = models.AutoField(primary_key = True)
     meta_name_id = models.ForeignKey(MetaDataNames,
 on_delete=models.CASCADE,)
     value = models.CharField(max_length=200, unique=True)

 class Document(models.Model):
     test_id = models.AutoField(primary_key = True)
     doc_name = models.CharField(max_length=200, unique=True)
     metadata = jsonfield.JSONField(blank=True)

 This lines of code in the DocumentAdminForm(forms.ModelForm) contains :

         def __init__(self, *args, **kwargs):
             metadata_names = MetaDataNames.objects.all()
             # create the fields
             for metadata in metadata_names:
                 self.fields[metadata.name] =
 forms.ModelMultipleChoiceField(widget=FilteredSelectMultiple(metadata.name,
 is_stacked=False), required=False,
 queryset=MetaDataValues.objects.filter(meta_name_id=metadata.meta_name_id).order_by('value'),)
          .....
 }}}

 The issue with the FilteredSelectMultiple widget is that when the field
 name has a space, the controls don't work. In the code above, where it
 says self.fields[metadata.name], the metadata.name part is the string 'Pet
 Names', with a space. If I use 'Pet_Names', then the controls in the
 widget work.

 I may be offending the Django Gods by having a field name with a space in
 it. One cannot do that in a model, as far as I can figure out. However, it
 is an interesting edge case for the widget, since it is perfectly
 reasonable for one to create fields as I am doing.

 I can continue to create the test case based on the above code if you
 want. However, if the answer is that I cannot have a field name with a
 space, then I won't bother.

 Please let me know if I should continue with a full test case, or that
 nothing will be done because I have a field name with a space in it.

 Thanks,

 Mark

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.d57d13305076326f5a079eb9b4f2202b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * status:  closed => new
 * resolution:  worksforme =>


Comment:

 I have attached a test django application (testFSM) that shows the
 behavior I am seeing. It was tested using Django 2.0.5 and Python 3.4.3 in
 a virtualenv on Ubuntu 14.04.

 To recap:

 If a field has a space in the field name for a ModelMultipleChoiceField
 (ie fields are generated in the __init__ function of a ModelForm), then
 the controls for the associated FilteredSelectMultiple widget are not
 enabled. One can still double click on an element in the widget, but the
 controls don't work. Also, one cannot clear the selected items or deselect
 the items in the list.

 Please see the README in the attached django project.

 Mark

--
Ticket URL: <https://code.djangoproject.com/ticket/29488#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.4dca77c94ca819727e312d5697f4916f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a Space

Django
In reply to this post by Django
#29488: FilteredSelectMultiple Controls Don't Work if The Name of the Widget Has a
Space
-------------------------------------+-------------------------------------
     Reporter:  Mark Phillips        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  2.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
  FilteredSelectMultiple widget      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mark Phillips):

 * Attachment "testFSM.zip" added.

 Django project that illustrates the bug in a FilteredSelectMultiple widget
 with a space in the field name

--
Ticket URL: <https://code.djangoproject.com/ticket/29488>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.e068f0a68c145be24cba7d23f2e8df59%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
12