[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trac
Subject:    [Trac] Re: TracNav-4.0pre7-py2.4 with TracEnvisionTheme-1.0-py2.4
From:       Eric Shubert <ejs () shubes ! net>
Date:       2008-09-30 16:04:21
Message-ID: gbtim6$6lm$1 () ger ! gmane ! org
[Download RAW message or body]


Thomas Moschny wrote:
> 2008/9/30 Eric Shubert <ejs@shubes.net>:
>> I looked at and compared the sources, and the PageOutline uses
>> class="wiki-toc" for the div, while TracNav uses class="wiki-toc trac-nav"
>> for the div, but then has class="wiki" for each item. Could this be the
>> problem? If so, I'm guessing that TracNav needs a little work to correct
>> this. I'm not savvy enough (yet) with CSS or python to locate the problem
>> and code the fix (or fix the code).
> 
> In fact that's a problem of the TracEnvisionTheme plugin/theme. It
> uses JQuery to rewrite parts of the document (which itself is
> questionable, as it probably should use Genshi instead). However,
> while searching for matching elements to rewrite, it only finds
> elements that are in the 'wiki-toc' class only, due to its wrong usage
> of JQuery selectors.
> 
> Attached is a patch that fixes this issue for me.
> 
> I must admit though, that the final result is a bit unpleasing
> (visually) because of the green bullets not being properly indented,
> but left-aligned instead. For that TracNav is to be blamed. Maybe I'll
> have a look at this issue later.
> 
> Regards,
> Thomas
> 

Wow, Thanks a bunch, Thomas. Works just great!

You're right about the bullets. They could be simply omitted in the TOC as
far as I'm concerned. I don't see their purpose there. Please let me/us know
if/when you come up with something for this issue.

Thanks again!

> 
> ------------------------------------------------------------------------
> 
> diff -r f2279e4f4466 envisiontheme/templates/envision_theme.html
> --- a/envisiontheme/templates/envision_theme.html	Thu Sep 11 16:22:46 2008 +0100
> +++ b/envisiontheme/templates/envision_theme.html	Tue Sep 30 15:45:38 2008 +0200
> @@ -102,11 +102,11 @@
>                   ${select('*')}
>                <script type="text/javascript">
>                  jQuery(document).ready( function($) {
> -                  var inner_html = $('div[@class="wiki-toc"]').html();
> +                  var inner_html = $('div.wiki-toc').html();
>                    var new_html = '  <div class="layout_content">' +
>                      '   <div class="layout_t"></div>\n   <div class="layout_bd">' +
>                      inner_html + '</div></div><div class="layout_b dialog"><div></div></div>';
> -                    $('div[@class="wiki-toc"]').html(new_html).
> +                    $('div.wiki-toc').html(new_html).
>                        addClass('layout').addClass('dialog');
>                  });
>                </script>


-- 
-Eric 'shubes'


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic