Indefero

Indefero Commit Details

Date:2012-04-29 00:24:09 (2 years 6 months ago)
Author:Thomas Keller
Branch:develop, release-1.3
Commit:8db3c45763d22b8363ef8b425035358c172d0acb
Parents: e8882292b5f085e5bab6f307a627360fbdcfe2cb
Message:Revamp this a little and make it jQuery 1.7 compatible (fixes issue 803)

Changes:
MNEWS.mdtext (1 diff)
Mwww/media/idf/js/wiki-toc.js (1 diff)

File differences

NEWS.mdtext
33
44
55
6
67
78
89
## Bugfixes
- Compatiblity fixes for PostgreSQL (fixes issue 800)
- Fix TOC generation in wiki (issue 803)
## Language and Translations
www/media/idf/js/wiki-toc.js
11
22
3
4
5
6
3
4
5
6
7
8
9
710
811
912
$(document).ready(function() {
$(":header", "#wiki-content").map(function(index) {
this.id = "wikititle_" + index;
$("<a href='#" + this.id + "'>" + jQuery.fn.text([this]) + "</a>")
.addClass("wiki-" + this.tagName.toLowerCase())
.appendTo('#wiki-toc-content');
var $header = $(this);
var $toc = $('#wiki-toc-content');
$header.attr('id', 'wikititle_' + index);
$('<a />').attr('href', '#' + $header.attr('id'))
.text($header.text())
.addClass("wiki-" + $header[0].tagName.toLowerCase())
.appendTo($toc);
});
if ($('#wiki-toc-content *').size() < 2)
$('#wiki-toc').hide();

Archive Download the corresponding diff file