Ticket #12882: 12882.2.diff

File 12882.2.diff, 1.4 KB (added by jezdez, 5 years ago)

The collapse widget needs jQuery, too

  • django/contrib/admin/helpers.py

    diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
    index 3c1febd..84d6e20 100644
    a b class Fieldset(object): 
    7575
    7676    def _media(self):
    7777        if 'collapse' in self.classes:
    78             return forms.Media(js=['%sjs/collapse.min.js' % settings.ADMIN_MEDIA_PREFIX])
     78            js = ['js/jquery.min.js', 'js/collapse.min.js']
     79            return forms.Media(js=['%s%s' % (settings.ADMIN_MEDIA_PREFIX, url) for url in js])
    7980        return forms.Media()
    8081    media = property(_media)
    8182
  • django/contrib/admin/templates/admin/edit_inline/stacked.html

    diff --git a/django/contrib/admin/templates/admin/edit_inline/stacked.html b/django/contrib/admin/templates/admin/edit_inline/stacked.html
    index fb112a0..2c7e878 100644
    a b  
    6363            })
    6464        });
    6565    });
    66 })(jQuery.noConflict());
     66})(jQuery.noConflict(true));
    6767</script>
  • django/contrib/admin/templates/admin/edit_inline/tabular.html

    diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html
    index dc9552f..ecbed7c 100644
    a b  
    109109            })
    110110        });
    111111    });
    112 })(jQuery.noConflict());
     112})(jQuery.noConflict(true));
    113113</script>
Back to Top