Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2011-02-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
+---
   Reporter:  rduffield | Owner:  copelco
 Status:  assigned  | Milestone:  1.3
  Component:  django.contrib.admin  |   Version:  SVN
 Resolution:|  Keywords: 
   Triage Stage:  Ready for checkin | Has patch:  1  
Needs documentation:  0 |   Needs tests:  0  
Patch needs improvement:  0 |  
+---
Changes (by julien):

  * stage:  Accepted => Ready for checkin


Comment:

 Ramiro, I like the approach in your patch. I've just updated it with a
 test for when the first field only has a single widget. I've also renamed
 the `stable_id` property to `id_for_label`, which may be a bit more
 versatile. Thanks!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2010-12-15 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  copelco
Status:  assigned  | Milestone:  1.3
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 I've just attached a patch that, just like rduffield's patch, proposes
 solving this on the Python side by adding a property to
 django.forms.!BoundField.

 Difference is that it uses a strategy similar to the `label_tag()` method
 to make sure it returns a form ID usable for e.e. auto-focusing the field.
 The new property name is ''stable_field'', for lack of a better name, can
 be changed if native English speakers deem necessary.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2010-12-15 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  copelco
Status:  assigned  | Milestone:  1.3
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 #14364 and #14858 were also a duplicates, both proposed JS-based
 solutions.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2010-03-24 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  copelco
Status:  assigned  | Milestone:  1.3
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ubernostrum):

  * milestone:  1.2 => 1.3

Comment:

 This is another ticket that's not really release-critical; pushing off the
 1.2 milestone, and we'll likely hit it in 1.3 (which is being scheduled to
 focus on these sorts of minor-annoyance issues).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2010-03-21 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  copelco
Status:  assigned  | Milestone:  1.2
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by copelco):

 Tested in:
  * Mac: Safari 4.0.5, Firefox 3.6, Chrome 5.0.307.11 beta
  * Windows: Internet Explorer 6.0.2800.1106

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2010-03-21 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  copelco
Status:  assigned  | Milestone:  1.2
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by copelco):

  * owner:  ales_zoulek => copelco
  * status:  new => assigned

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-05-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  ales_zoulek
Status:  new   | Milestone:  1.2
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * milestone:  1.1 => 1.2

Comment:

 Pushing to 1.2: this is a UI issue which is annoying but doesn't impact
 usability.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-05-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  ales_zoulek
Status:  new   | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by ales_zoulek):

 updated the patch to first try it the old way and if it fails to fall back
 to for-loop.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-05-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  ales_zoulek
Status:  new   | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ales_zoulek):

  * owner:  nobody => ales_zoulek

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-05-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ales.zou...@gmail.com):

 I added a patch. Focusing first form field could not be as trivial at it
 seems. But it should work fine.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-05-07 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

 * cc: ales.zou...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-04-02 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-03-23 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by rduffield):

 That certainly seems like a great alternative to me; I was simply trying
 to maintain what I figured was the convention.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-03-23 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by CollinAnderson):

 Can we instead have the javascript find the first form element
 automatically and focus that?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-03-23 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
---+
  Reporter:  rduffield | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by rduffield):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I have attached a test that reproduces this bug.

 Note that I should have been more clear; this bug is only evident if the
 ``DateTime`` field is of course the first field rendered in the admin
 form.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #10573: Bug when auto-focusing on field with MultiWidget in admin site

2009-03-20 Thread Django
#10573: Bug when auto-focusing on field with MultiWidget in admin site
--+-
 Reporter:  rduffield |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 The admin site {{{JavaScript}}}, when creating a new instance of a model
 with a {{{DateTimeField}}}, attempts to focus on an element that does not
 exist.  Take this basic example:

 {{{
 class Reservation(models.Model):
 start_date = models.DateTimeField(blank=False, null=False)
 }}}


 This results in the use of the {{{AdminSplitDateTime}}} widget.  The two
 respective HTML fields have IDs of {{{id_start_date_0}}} and
 {{{id_start_date_1}}}.  However, the {{{JavaScript}}} that is generated
 is:

 {{{
 document.getElementById("id_start_date").focus();
 }}}

 This fails, due to there not being an element on the page with an ID of
 {{{id_start_date}}}.

 I tracked this down to the {{{_auto_id}}} method within the
 {{{BoundField}}} class.  Creating the {{{auto_id}}} depends on the field's
 {{{html_name}}}; in the case outlined above, both fields have
 {{{html_names}}} of {{{start_date}}}.  However, the rendering of a
 {{{MultiWidget}}} is such that the IDs are generated differently than
 normal widgets.

 My naive patch introduces a new property on a {{{BoundField}}} called
 {{{focus_id}}}.  The {{{focus_id}}} returns {{{auto_id}}} as before for
 all widgets that are not {{{MultiWidgets}}}.  Otherwise, it returns the
 first element within a {{{MultiWidget}}} set.  The admin
 {{{change_form.html}}} template now also takes advantage of this field.  I
 did not want to change any logic within {{{auto_id}}} itself; this seemed
 a little more dangerous.  :-)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---