C'est plus propre comme ca.
darcs-hash:20060430072050-68412-cad6875288c8c6f02d65781652b70c8c71f94297.gz
This commit is contained in:
parent
7d9932d360
commit
3c3f1b1028
1 changed files with 16 additions and 9 deletions
|
@ -5,6 +5,7 @@
|
||||||
Optional integer argument: maximal depth of listing.
|
Optional integer argument: maximal depth of listing.
|
||||||
|
|
||||||
@copyright: 2000, 2001, 2002 by Jürgen Hermann <jh@web.de>
|
@copyright: 2000, 2001, 2002 by Jürgen Hermann <jh@web.de>
|
||||||
|
@copyright: 2006 by Grégoire Détrez <gdetrez@crans.org>
|
||||||
@license: GNU GPL, see COPYING for details.
|
@license: GNU GPL, see COPYING for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -78,16 +79,22 @@ class TableOfContents:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
html = [
|
html = [
|
||||||
self.macro.formatter.rawHTML(u'<div id="tableOfContents">'),
|
self.macro.formatter.open('div', True, {'id': 'tableOfContents'}),
|
||||||
self.macro.formatter.rawHTML(u'<h2 id="toctitle">Sommaire</h2>'),
|
self.macro.formatter.open('h2', False, {'id': 'toctitle'}),
|
||||||
self.macro.formatter.rawHTML(u'<div id="tableOfContentsList">'),
|
self.macro.formatter.text(u'Sommaire'),
|
||||||
''.join(self.result),
|
self.macro.formatter.close('h2', True),
|
||||||
self.macro.formatter.rawHTML(u'</div>'),
|
self.macro.formatter.open('div', True, {'id': 'tableOfContentsList'}),
|
||||||
self.macro.formatter.rawHTML(u'</div>'),
|
''.join(self.result),
|
||||||
self.macro.formatter.rawHTML(u'<div class="visualClear"></div>'),
|
self.macro.formatter.close('div', True),
|
||||||
self.macro.formatter.rawHTML(u'<script type="text/javascript" src="/wiki/common/toc/toc.js"></script>'),
|
self.macro.formatter.close('div', True),
|
||||||
|
self.macro.formatter.open('div', False, {'class': 'visualClear'}),
|
||||||
|
self.macro.formatter.close('div', True),
|
||||||
|
self.macro.formatter.open('script', False,
|
||||||
|
{'type': 'text/javascript',
|
||||||
|
'src': '/wiki/common/toc/toc.js'}),
|
||||||
|
self.macro.formatter.close('script', True),
|
||||||
]
|
]
|
||||||
return u'\n'.join(html)
|
return u''.join(html)
|
||||||
except:
|
except:
|
||||||
return ''.join(self.result)
|
return ''.join(self.result)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue