From 902df97f369f86b670d2254c9a54d05fd400069a Mon Sep 17 00:00:00 2001 From: Wilson Miner Date: Sun, 16 Nov 2008 00:08:48 +0000 Subject: [PATCH] Removed the hidden import rules in the contrib.admin stylesheets. Each individual stylesheet is now linked to explicitly from the template where it's used (in the extrastyle block), with the exception of widgets.css, which is imported by forms.css, but still available separately for reuse. Also moved the override stylesheets (IE and RTL) below the extrastyle block and all styles within the conditional comment which blocks CSS from IE5 and lower. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9463 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/css/changelists.css | 2 -- django/contrib/admin/media/css/dashboard.css | 2 -- django/contrib/admin/media/css/forms.css | 1 - django/contrib/admin/media/css/login.css | 2 -- django/contrib/admin/templates/admin/base.html | 6 ++++-- django/contrib/admin/templates/admin/change_form.html | 2 +- django/contrib/admin/templates/admin/change_list.html | 2 +- django/contrib/admin/templates/admin/index.html | 2 +- django/contrib/admin/templates/admin/login.html | 2 +- 9 files changed, 8 insertions(+), 13 deletions(-) diff --git a/django/contrib/admin/media/css/changelists.css b/django/contrib/admin/media/css/changelists.css index 9ff4f724aa2..40142f50cad 100644 --- a/django/contrib/admin/media/css/changelists.css +++ b/django/contrib/admin/media/css/changelists.css @@ -1,5 +1,3 @@ -@import url('base.css'); - /* CHANGELISTS */ #changelist { diff --git a/django/contrib/admin/media/css/dashboard.css b/django/contrib/admin/media/css/dashboard.css index da814e3daa0..88e3b1d6402 100644 --- a/django/contrib/admin/media/css/dashboard.css +++ b/django/contrib/admin/media/css/dashboard.css @@ -1,5 +1,3 @@ -@import url('base.css'); - /* DASHBOARD */ .dashboard .module table th { diff --git a/django/contrib/admin/media/css/forms.css b/django/contrib/admin/media/css/forms.css index 46946b7f147..fbe4b753af3 100644 --- a/django/contrib/admin/media/css/forms.css +++ b/django/contrib/admin/media/css/forms.css @@ -1,4 +1,3 @@ -@import url('base.css'); @import url('widgets.css'); /* FORM ROWS */ diff --git a/django/contrib/admin/media/css/login.css b/django/contrib/admin/media/css/login.css index a4391572f66..8d90d129017 100644 --- a/django/contrib/admin/media/css/login.css +++ b/django/contrib/admin/media/css/login.css @@ -1,5 +1,3 @@ -@import url('base.css'); - /* LOGIN FORM */ body.login { diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index cbbfcd3f84e..e969d1b82d1 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -2,10 +2,12 @@ {% block title %}{% endblock %} - + + +{% block extrastyle %}{% endblock %} {% if LANGUAGE_BIDI %}{% endif %} -{% block extrastyle %}{% endblock %} + {% block extrahead %}{% endblock %} {% block blockbots %}{% endblock %} diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index ab63ecf6e06..19d1d7d6fcb 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -6,7 +6,7 @@ {{ media }} {% endblock %} -{% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %} +{% block extrastyle %}{% endblock %} {% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %} diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index c5a9ea9c900..02268e9726a 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} {% load adminmedia admin_list i18n %} -{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %} +{% block extrastyle %}{% endblock %} {% block bodyclass %}change-list{% endblock %} diff --git a/django/contrib/admin/templates/admin/index.html b/django/contrib/admin/templates/admin/index.html index 9eb60b80713..03413ba7798 100644 --- a/django/contrib/admin/templates/admin/index.html +++ b/django/contrib/admin/templates/admin/index.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} {% load i18n %} -{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %} +{% block extrastyle %}{% endblock %} {% block coltype %}colMS{% endblock %} diff --git a/django/contrib/admin/templates/admin/login.html b/django/contrib/admin/templates/admin/login.html index 8c7603682b0..8f3d0888059 100644 --- a/django/contrib/admin/templates/admin/login.html +++ b/django/contrib/admin/templates/admin/login.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} {% load i18n %} -{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %} +{% block extrastyle %}{% load adminmedia %}{% endblock %} {% block bodyclass %}login{% endblock %}