[Checkins] SVN: zope.kgs/trunk/src/zope/kgs/templates/master.pt use siteRoot and do proper menu selection.
Paul Carduner
paulcarduner at gmail.com
Tue Jan 27 08:24:18 EST 2009
Log message for revision 95179:
use siteRoot and do proper menu selection.
Changed:
U zope.kgs/trunk/src/zope/kgs/templates/master.pt
-=-
Modified: zope.kgs/trunk/src/zope/kgs/templates/master.pt
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/master.pt 2009-01-27 13:23:50 UTC (rev 95178)
+++ zope.kgs/trunk/src/zope/kgs/templates/master.pt 2009-01-27 13:24:17 UTC (rev 95179)
@@ -19,8 +19,25 @@
$("#left-hand-navigation .level-two").hide();
$(this).children('a').andSelf().addClass('selected').find('.level-two').show();
});
+ $("#left-hand-navigation .level-one > li").eq(0).click();
- $("#left-hand-navigation .level-one > li").eq(0).click();
+ $("#left-hand-navigation .level-one > li > a").each(
+ function(index){
+ var href = $(this).attr("href");
+ if (window.location.href.slice(window.location.href.length-href.length) === href){
+ $(this).parent().click();
+ }
+ });
+
+ $("#left-hand-navigation .level-one > li li > a").each(
+ function(index){
+ var href = $(this).attr("href").match(/[.*\/]*(.*.html)/);
+ href = href && href[1];
+ if (href && window.location.href.slice(window.location.href.length-href.length) === href){
+ $(this).parents("li").click();
+ }
+ });
+
});
</script>
@@ -35,20 +52,20 @@
<ul class="level-one" metal:define-slot="left-nav">
<li tal:repeat="version versions">
- <a href="#">Version <span tal:replace="version/name">1</span></a>
+ <a href="javascript:void(0);">Version <span tal:replace="version/name">1</span></a>
<ul class="level-two" style="display: none;">
<li tal:condition="version/announcement/url">
<a href="#"
- tal:attributes="href version/announcement/url">Announcement</a>
+ tal:attributes="href string:${siteRoot}${version/announcement/url}">Announcement</a>
</li>
<li tal:condition="version/changelog/url">
<a href="#"
- tal:attributes="href version/changelog/url">Changelog</a>
+ tal:attributes="href string:${siteRoot}${version/changelog/url}">Changelog</a>
</li>
<li tal:repeat="feature version/features">
<a href="#"
- tal:attributes="href feature/url"
+ tal:attributes="href string:${siteRoot}${feature/url}"
tal:content="feature/title">Feature 1</a>
</li>
<li tal:replace="nothing">
@@ -64,7 +81,8 @@
</li>
<li>
- <a href="intro.html">KGS Introduction</a>
+ <a href="intro.html"
+ tal:attributes="href string:${siteRoot}intro.html">KGS Introduction</a>
</li>
</ul>
More information about the Checkins
mailing list