Hi all,  in case you're still dealing with any Trac admins that are using
IE6 (yes, there are some floating around out there - we just found one
yesterday ;-),  here is what we discovered for fixing the layout of the
admin pages.

The .addnew CSS class (from admin.css) that gets applied to things like the
"Add Account" form on the users page uses float:right to move to the right
side of the page.  This causes IE6 some issues in calculating the layout and
is manifested by the content in the middle of the page (e.g. the user list)
to stretch all the way to the right of the page.

The fix is to forcibly set the width of the non "addnew" content since it is
not calculated correctly.

One issue that came up in applying this generally to all of the admin pages
is that there isn't any class that is assigned to items that don't get the
float:right treatment.  We ended up using a little bit of extra javascript
to do this dynamically.

Since we have upgraded jQuery to 1.3.2 we were able to use jQuery's
closest() method to pick out forms that are within the #tabcontent id, but
are not within an .addnew item.  This would get inserted into the
ie_pre7_hacks.js file.

$('#tabcontent form').each(function() {
if($(this).closest('.addnew').length == 0) {
$(this).css({width:'62%'});
}
});

If you have jQuery 1.2.6 (which is the default for Trac 0.11.x),  then you'd
need to modify this slightly (or do something else to tweak the generated
HTML to have a class that you can target).

It's a bit of a hack and could certainly be more elegant, but it makes the
admin pages functional under IE6 again without breaking other browsers,  so
it's probably not worth too much additional effort.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to