Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #6183 -- Stopped hiding the help text for SelectFilter widgets.…

… Thanks, acdha.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15150 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a4dd476fc2d3ddc16f60141ee496f4b61b456c99 1 parent 84660f0
@jezdez jezdez authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 django/contrib/admin/media/js/SelectFilter2.js
View
11 django/contrib/admin/media/js/SelectFilter2.js
@@ -24,10 +24,17 @@ var SelectFilter = {
from_box.id += '_from'; // change its ID
from_box.className = 'filtered';
- // Remove <p class="info">, because it just gets in the way.
var ps = from_box.parentNode.getElementsByTagName('p');
for (var i=0; i<ps.length; i++) {
- from_box.parentNode.removeChild(ps[i]);
+ if (ps[i].className.indexOf("info") != -1) {
+ // Remove <p class="info">, because it just gets in the way.
+ from_box.parentNode.removeChild(ps[i]);
+ } else if (ps[i].className.indexOf("help") != -1) {
+ // Move help text up to the top so it isn't below the select
+ // boxes or wrapped off on the side to the right of the add
+ // button:
+ from_box.parentNode.insertBefore(ps[i], from_box.parentNode.firstChild);
+ }
}
// <div class="selector"> or <div class="selector stacked">
Please sign in to comment.
Something went wrong with that request. Please try again.