summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRudy Mutter <rudy@yetihq.com>2013-09-06 15:46:38 -0500
committerRudy Mutter <rudy@yetihq.com>2013-09-06 15:46:38 -0500
commitc438cc2a3653644ea42987f7e65f6f638ca85f6c (patch)
tree425e01a8b602b58adb53e2ef75f22ff3c27ef061 /django
parent32838a5beb29fe4f23fa7881e6535b1b7384d39c (diff)
Fixed #20821 -- Added tooltips to Admin SelectBox widget
The Admin widget, which can be used to filter multiple selects can sometimes be too narrow and hide information such as user permissions. This commit adds tooltips to the select options so that a user can hover over and see the hidden text.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/static/admin/js/SelectBox.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/admin/static/admin/js/SelectBox.js b/django/contrib/admin/static/admin/js/SelectBox.js
index f28c861513..db3206ccf5 100644
--- a/django/contrib/admin/static/admin/js/SelectBox.js
+++ b/django/contrib/admin/static/admin/js/SelectBox.js
@@ -16,7 +16,10 @@ var SelectBox = {
for (var i = 0, j = SelectBox.cache[id].length; i < j; i++) {
var node = SelectBox.cache[id][i];
if (node.displayed) {
- box.options[box.options.length] = new Option(node.text, node.value, false, false);
+ var new_option = new Option(node.text, node.value, false, false);
+ // Shows a tooltip when hovering over the option
+ new_option.setAttribute("title", node.text);
+ box.options[box.options.length] = new_option;
}
}
},