Re: [Django] #19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and 'tabular.html' when using inline content

2012-11-17 Thread Django
#19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and
'tabular.html' when using inline content
-+-
 Reporter:  replytosander@…  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.4
Component:  contrib.admin|   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

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


Comment:

 This is a feature request, and it isn't very precise. In such cases, it's
 best to write to the [https://groups.google.com/group/django-developers
 django-developers] mailing list, and open a ticket once a concrete action
 plan has been determined.

 Overriding admin templates is the canonical way to inject additional
 features in the admin pages. Your library can ship templates replacing the
 admin's built-in templates; they will be used if you app comes before
 `django.contrib.admin` in INSTALLED_APPS.

-- 
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 https://groups.google.com/groups/opt_out.




Re: [Django] #19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and 'tabular.html' when using inline content

2012-10-03 Thread Django
#19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and
'tabular.html' when using inline content
-+-
 Reporter:  replytosander@…  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.4
Component:  contrib.admin|   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by anonymous):

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


Comment:

 Code used in overridden stacked.html template:


 {{{
 var updateOrderedSelectFilter = function() {
 // If any SelectFilter widgets are a part of the new form,
 // instantiate a new SelectFilter instance for it.
 if (typeof OrderdSelectFilter != "undefined"){
 $(".selectfilter").each(function(index, value){
 var namearr = value.name.split('-');
 OrderdSelectFilter.init(value.id,
 namearr[namearr.length-1], false, "{% admin_media_prefix %}");
 });
 $(".selectfilterstacked").each(function(index, value){
 var namearr = value.name.split('-');
 OrderdSelectFilter.init(value.id,
 namearr[namearr.length-1], true, "{% admin_media_prefix %}");
 });
 }
 }
 }}}

-- 
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 https://groups.google.com/groups/opt_out.




[Django] #19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and 'tabular.html' when using inline content

2012-10-03 Thread Django
#19065: The FilteredManyToMany widget needs javascript in 'stacked.html' and
'tabular.html' when using inline content
--+
 Reporter:  replytosander@…   |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  contrib.admin |Version:  1.4
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 I'm developing a custom sortable manytomany widget which allows the user
 to order the items in the widget.

 You can find it here: https://github.com/fabrique/django-sortedm2m

 When using inline models the widget needs the javascript in stacked.html
 and/or tabular.html. It initializes a new instance when adding an inline
 item.

 To keep the sortedm2m library as pluggable as possible I would like to
 know how I can provide this javascript in the library. This way a
 developer doesn't need to override the admin templates.

 This doesn't seem possible at the moment. Maybe there should be a way to
 provide document ready javascript in the scope of the widget.

 Any ideas on this?

-- 
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 https://groups.google.com/groups/opt_out.