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):
|
def _media(self):
|
||||||
if 'collapse' in self.classes:
|
if 'collapse' in self.classes:
|
||||||
extra = '' if settings.DEBUG else '.min'
|
extra = '' if settings.DEBUG else '.min'
|
||||||
js = ['jquery%s.js' % extra,
|
js = ['vendor/jquery/jquery%s.js' % extra,
|
||||||
'jquery.init.js',
|
'jquery.init.js',
|
||||||
'collapse%s.js' % extra]
|
'collapse%s.js' % extra]
|
||||||
return forms.Media(js=[static('admin/js/%s' % url) for url in js])
|
return forms.Media(js=[static('admin/js/%s' % url) for url in js])
|
||||||
|
|
|
@ -566,7 +566,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
js = [
|
js = [
|
||||||
'core.js',
|
'core.js',
|
||||||
'admin/RelatedObjectLookups.js',
|
'admin/RelatedObjectLookups.js',
|
||||||
'jquery%s.js' % extra,
|
'vendor/jquery/jquery%s.js' % extra,
|
||||||
'jquery.init.js',
|
'jquery.init.js',
|
||||||
'actions%s.js' % extra,
|
'actions%s.js' % extra,
|
||||||
'urlify.js',
|
'urlify.js',
|
||||||
|
@ -1759,7 +1759,8 @@ class InlineModelAdmin(BaseModelAdmin):
|
||||||
@property
|
@property
|
||||||
def media(self):
|
def media(self):
|
||||||
extra = '' if settings.DEBUG else '.min'
|
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:
|
if self.filter_vertical or self.filter_horizontal:
|
||||||
js.extend(['SelectBox.js', 'SelectFilter2.js'])
|
js.extend(['SelectBox.js', 'SelectFilter2.js'])
|
||||||
return forms.Media(js=[static('admin/js/%s' % url) for url in 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
|
* CSS and images in ``contrib.admin`` to support Internet Explorer 6 & 7 have
|
||||||
been removed as these browsers have reached end-of-life.
|
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``
|
* The text displayed for null columns in the admin changelist ``list_display``
|
||||||
cells has changed from ``(None)`` (or its translated equivalent) to ``-``.
|
cells has changed from ``(None)`` (or its translated equivalent) to ``-``.
|
||||||
|
|
||||||
|
|
|
@ -1104,8 +1104,8 @@ class AdminJavaScriptTest(TestCase):
|
||||||
"""
|
"""
|
||||||
with override_settings(DEBUG=False):
|
with override_settings(DEBUG=False):
|
||||||
response = self.client.get(reverse('admin:admin_views_section_add'))
|
response = self.client.get(reverse('admin:admin_views_section_add'))
|
||||||
self.assertNotContains(response, 'jquery.js')
|
self.assertNotContains(response, 'vendor/jquery/jquery.js')
|
||||||
self.assertContains(response, 'jquery.min.js')
|
self.assertContains(response, 'vendor/jquery/jquery.min.js')
|
||||||
self.assertNotContains(response, 'prepopulate.js')
|
self.assertNotContains(response, 'prepopulate.js')
|
||||||
self.assertContains(response, 'prepopulate.min.js')
|
self.assertContains(response, 'prepopulate.min.js')
|
||||||
self.assertNotContains(response, 'actions.js')
|
self.assertNotContains(response, 'actions.js')
|
||||||
|
@ -1116,8 +1116,8 @@ class AdminJavaScriptTest(TestCase):
|
||||||
self.assertContains(response, 'inlines.min.js')
|
self.assertContains(response, 'inlines.min.js')
|
||||||
with override_settings(DEBUG=True):
|
with override_settings(DEBUG=True):
|
||||||
response = self.client.get(reverse('admin:admin_views_section_add'))
|
response = self.client.get(reverse('admin:admin_views_section_add'))
|
||||||
self.assertContains(response, 'jquery.js')
|
self.assertContains(response, 'vendor/jquery/jquery.js')
|
||||||
self.assertNotContains(response, 'jquery.min.js')
|
self.assertNotContains(response, 'vendor/jquery/jquery.min.js')
|
||||||
self.assertContains(response, 'prepopulate.js')
|
self.assertContains(response, 'prepopulate.js')
|
||||||
self.assertNotContains(response, 'prepopulate.min.js')
|
self.assertNotContains(response, 'prepopulate.min.js')
|
||||||
self.assertContains(response, 'actions.js')
|
self.assertContains(response, 'actions.js')
|
||||||
|
|
Loading…
Reference in New Issue