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
This commit is contained in:
parent
84660f0f3c
commit
a4dd476fc2
|
@ -24,10 +24,17 @@ var SelectFilter = {
|
||||||
from_box.id += '_from'; // change its ID
|
from_box.id += '_from'; // change its ID
|
||||||
from_box.className = 'filtered';
|
from_box.className = 'filtered';
|
||||||
|
|
||||||
// Remove <p class="info">, because it just gets in the way.
|
|
||||||
var ps = from_box.parentNode.getElementsByTagName('p');
|
var ps = from_box.parentNode.getElementsByTagName('p');
|
||||||
for (var i=0; i<ps.length; i++) {
|
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">
|
// <div class="selector"> or <div class="selector stacked">
|
||||||
|
|
Loading…
Reference in New Issue