Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Further improved on the work done in r16622 by making the help text i…

…cons look hoverable in the admin tabular inline headers.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3e65f9633ba86d9c615556f45034301f880bca10 1 parent 804a6db
Julien Phalip authored August 26, 2011
4  django/contrib/admin/static/admin/css/base.css
@@ -189,6 +189,10 @@ p.mini {
189 189
     color: #999;
190 190
 }
191 191
 
  192
+img.help-tooltip {
  193
+    cursor: help;
  194
+}
  195
+
192 196
 p img, h1 img, h2 img, h3 img, h4 img, td img {
193 197
     vertical-align: middle;
194 198
 }
2  django/contrib/admin/templates/admin/edit_inline/tabular.html
@@ -10,7 +10,7 @@
10 10
      {% for field in inline_admin_formset.fields %}
11 11
        {% if not field.widget.is_hidden %}
12 12
          <th{% if forloop.first %} colspan="2"{% endif %}{% if field.required %} class="required"{% endif %}>{{ field.label|capfirst }}
13  
-         {% if field.help_text %}&nbsp;<img src="{% static "admin/img/icon-unknown.gif" %}" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}" />{% endif %}
  13
+         {% if field.help_text %}&nbsp;<img src="{% static "admin/img/icon-unknown.gif" %}" class="help help-tooltip" width="10" height="10" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}" />{% endif %}
14 14
          </th>
15 15
        {% endif %}
16 16
      {% endfor %}
2  tests/regressiontests/admin_inlines/tests.py
@@ -111,7 +111,7 @@ def test_help_text(self):
111 111
         """
112 112
         response = self.client.get('/test_admin/admin/admin_inlines/holder4/add/')
113 113
         self.assertContains(response, '<p class="help">Awesome stacked help text is awesome.</p>', 4)
114  
-        self.assertContains(response, '<img src="/static/admin/img/icon-unknown.gif" alt="(Awesome tabular help text is awesome.)" title="Awesome tabular help text is awesome." />', 1)
  114
+        self.assertContains(response, '<img src="/static/admin/img/icon-unknown.gif" class="help help-tooltip" width="10" height="10" alt="(Awesome tabular help text is awesome.)" title="Awesome tabular help text is awesome." />', 1)
115 115
 
116 116
 class TestInlineMedia(TestCase):
117 117
     fixtures = ['admin-views-users.xml']

0 notes on commit 3e65f96

Please sign in to comment.
Something went wrong with that request. Please try again.