Indefero

Indefero Commit Details


Date:2011-01-07 15:33:18 (13 years 11 months ago)
Author:William MARTIN
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:93af6a68bd07fd2377d8b09db3d989fbe1bf8d23
Parents: 146e956432782f3aa7c4d91fd21cbc79d4d1e99e
Message:Add table of contents on wiki pages

Changes:

File differences

src/IDF/templates/idf/wiki/view.html
1818
1919
2020
21
22
23
2124
2225
2326
......
2932
3033
3134
35
3236
3337
3438
</div>
{/if}
<div id="wiki-content">
<div id="wiki-toc"><span id="contentheader">{trans 'Table of Content'}</span><div id="wiki-toc-content"></div></div>
<script type="text/javascript" src="{media '/idf/js/wiki-toc.js'}"></script>
<p class="desc">{$page.summary}</p>
{if !$oldrev}
{/if}
{/if}
</div>
{/block}
{block context}
{ashowuser 'submitter', $page.get_submitter(), $request}
www/media/idf/css/style.css
746746
747747
748748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
749775
750776
751777
margin: 0px;
}
#wiki-toc {
float: right;
margin-left: 10px;
}
#wiki-toc-content {
border: 1px solid #999999;
border-width: 1px 0;
padding: 10px 0;
padding-bottom: 25px;
background-color: #ffffff;
display: block;
}
#wiki-toc-content a {
display: block;
}
#wiki-toc-content a.wiki-h2 {
margin-left: 1em;
}
#wiki-toc-content a.wiki-h3 {
margin-left: 2em;
}
/**
* main menu
*/
www/media/idf/js/wiki-toc.js
1
2
3
4
5
6
7
$(document).ready(function() {
$(":header", "#wiki-content").map(function (index) {
this.id = "wikititle_" + index;
$("<a href='#" + this.id + "'>" + this.innerText + "</a>").addClass("wiki-" + this.tagName.toLowerCase()).appendTo('#wiki-toc-content');
});
});

Archive Download the corresponding diff file

Page rendered in 0.07691s using 13 queries.