From 832ca058feecf1e80dcbe7cc38b655f8f4a6ebd4 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 3 Jun 2011 11:54:47 +0000 Subject: [PATCH] Internet Explorer fixes for admin sorting UI git-svn-id: http://code.djangoproject.com/svn/django/trunk@16321 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/css/base.css | 3 +++ .../admin/templates/admin/change_list_results.html | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/media/css/base.css b/django/contrib/admin/media/css/base.css index 0aab2b3f8ac..485be92604e 100644 --- a/django/contrib/admin/media/css/base.css +++ b/django/contrib/admin/media/css/base.css @@ -329,12 +329,15 @@ table thead th.descending a { table thead th.sorted a span.text { display: block; float: left; + cursor: pointer; /* IE needs this */ } table thead th.sorted a span.sortpos { display: block; float: right; font-size: .6em; + text-align: right; + cursor: pointer; /* IE needs this */ } table thead th.sorted a img { diff --git a/django/contrib/admin/templates/admin/change_list_results.html b/django/contrib/admin/templates/admin/change_list_results.html index ae62ce85484..6c1c399562b 100644 --- a/django/contrib/admin/templates/admin/change_list_results.html +++ b/django/contrib/admin/templates/admin/change_list_results.html @@ -65,8 +65,12 @@ var popup = $('#sorting-popup-div'); var img = $('#primary-sort-icon'); /* These next lines seems necessary to prime the popup: */ - popup.offset({left:-1000, top:0}); + popup.offset({left:0, top:-1000}); popup.show(); + if ($.browser.msie) { + // Can't find a way to make IE autosize the div. + popup.width(300); + } var popupWidth = popup.width(); popup.hide(); @@ -107,7 +111,10 @@ } }); - $('#sorting-popup-dismiss').click(hidePopup); + $('#sorting-popup-dismiss').click(function(ev) { + hidePopup(); + ev.preventDefault() + }); }); })(django.jQuery); //-->