mirror of https://github.com/django/django.git
Moved jQuery to a vendor/jquery subdirectory.
This commit is contained in:
parent
1daae25bdc
commit
788071e22d
|
@ -74,7 +74,7 @@ class Fieldset(object):
|
|||
def _media(self):
|
||||
if 'collapse' in self.classes:
|
||||
extra = '' if settings.DEBUG else '.min'
|
||||
js = ['jquery%s.js' % extra,
|
||||
js = ['vendor/jquery/jquery%s.js' % extra,
|
||||
'jquery.init.js',
|
||||
'collapse%s.js' % extra]
|
||||
return forms.Media(js=[static('admin/js/%s' % url) for url in js])
|
||||
|
|
|
@ -566,7 +566,7 @@ class ModelAdmin(BaseModelAdmin):
|
|||
js = [
|
||||
'core.js',
|
||||
'admin/RelatedObjectLookups.js',
|
||||
'jquery%s.js' % extra,
|
||||
'vendor/jquery/jquery%s.js' % extra,
|
||||
'jquery.init.js',
|
||||
'actions%s.js' % extra,
|
||||
'urlify.js',
|
||||
|
@ -1759,7 +1759,8 @@ class InlineModelAdmin(BaseModelAdmin):
|
|||
@property
|
||||
def media(self):
|
||||
extra = '' if settings.DEBUG else '.min'
|
||||
js = ['jquery%s.js' % extra, 'jquery.init.js', 'inlines%s.js' % extra]
|
||||
js = ['vendor/jquery/jquery%s.js' % extra, 'jquery.init.js',
|
||||
'inlines%s.js' % extra]
|
||||
if self.filter_vertical or self.filter_horizontal:
|
||||
js.extend(['SelectBox.js', 'SelectFilter2.js'])
|
||||
return forms.Media(js=[static('admin/js/%s' % url) for url in js])
|
||||
|
|
|
@ -597,6 +597,9 @@ Miscellaneous
|
|||
* CSS and images in ``contrib.admin`` to support Internet Explorer 6 & 7 have
|
||||
been removed as these browsers have reached end-of-life.
|
||||
|
||||
* The jQuery static files in ``contrib.admin`` have been moved into a
|
||||
``vendor/jquery`` subdirectory.
|
||||
|
||||
* The text displayed for null columns in the admin changelist ``list_display``
|
||||
cells has changed from ``(None)`` (or its translated equivalent) to ``-``.
|
||||
|
||||
|
|
|
@ -1104,8 +1104,8 @@ class AdminJavaScriptTest(TestCase):
|
|||
"""
|
||||
with override_settings(DEBUG=False):
|
||||
response = self.client.get(reverse('admin:admin_views_section_add'))
|
||||
self.assertNotContains(response, 'jquery.js')
|
||||
self.assertContains(response, 'jquery.min.js')
|
||||
self.assertNotContains(response, 'vendor/jquery/jquery.js')
|
||||
self.assertContains(response, 'vendor/jquery/jquery.min.js')
|
||||
self.assertNotContains(response, 'prepopulate.js')
|
||||
self.assertContains(response, 'prepopulate.min.js')
|
||||
self.assertNotContains(response, 'actions.js')
|
||||
|
@ -1116,8 +1116,8 @@ class AdminJavaScriptTest(TestCase):
|
|||
self.assertContains(response, 'inlines.min.js')
|
||||
with override_settings(DEBUG=True):
|
||||
response = self.client.get(reverse('admin:admin_views_section_add'))
|
||||
self.assertContains(response, 'jquery.js')
|
||||
self.assertNotContains(response, 'jquery.min.js')
|
||||
self.assertContains(response, 'vendor/jquery/jquery.js')
|
||||
self.assertNotContains(response, 'vendor/jquery/jquery.min.js')
|
||||
self.assertContains(response, 'prepopulate.js')
|
||||
self.assertNotContains(response, 'prepopulate.min.js')
|
||||
self.assertContains(response, 'actions.js')
|
||||
|
|
Loading…
Reference in New Issue