#39: Disable old Trac CSS files
------------------------+-------------------------------------
Reporter: jdreimann | Owner: nobody
Type: task | Status: new
Priority: critical | Milestone: RC1 for initial release
Component: ui design | Version:
Resolution: | Keywords:
------------------------+-------------------------------------
Comment (by gjm):
If we are only removing trac provided common/css/*.css we could probably
do this using the post_process_request of an IRequestFilter in the
bloodhound theme. This way we would not have to change trac itself, which
would be good.
I believe something like this could do the job:
{{{#!python
links = req.chrome.get('links',{})
indices = [i for (i,ss) in enumerate(links.get('stylesheet',[]))
if ss.get('href').startswith(req.base_path +
'/chrome/common/css/')]
for i in indices:
del links['stylesheet'][i]
}}}
This is based on how the theme engine code does the job, though a fair bit
more condensed.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/39#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker