Last change
on this file since 103828 was
103828,
checked in by marcimat@…, 4 years ago
|
Retour sur r103827 pour deux problèmes :
1) autoriser plus de 10 notes dans la page (ajout du +)
2) c'est soit nb3footnote soit nb3appendix (manquait des parenthèses).
Merci Pipol pour le signalement.
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined('_ECRIRE_INC_VERSION')) return; |
---|
4 | |
---|
5 | /** |
---|
6 | * Insertion de la css du plugin dans les pages publiques |
---|
7 | * |
---|
8 | * @param $flux |
---|
9 | * @return mixed |
---|
10 | */ |
---|
11 | function bigfoot_insert_head_css($flux){ |
---|
12 | $flux .="\n".'<link rel="stylesheet" href="'. find_in_path('css/bigfoot-number.css') .'" />'; |
---|
13 | return $flux; |
---|
14 | } |
---|
15 | |
---|
16 | |
---|
17 | /** |
---|
18 | * Insertion du script du plugin dans les pages publiques |
---|
19 | * |
---|
20 | * @param $flux |
---|
21 | * @return mixed |
---|
22 | */ |
---|
23 | function bigfoot_insert_head($flux){ |
---|
24 | $flux .="\n".'<script type="text/javascript" src="'. find_in_path('javascript/bigfoot.js') .'"></script>'; |
---|
25 | $flux .= <<<EOH |
---|
26 | <script type="text/javascript">/* <![CDATA[ */ |
---|
27 | (function($) { |
---|
28 | var bigfoot_init = function() { |
---|
29 | jQuery.bigfoot({ |
---|
30 | anchorPattern: /(nb\d+(footnote|appendix))/gi, |
---|
31 | anchorParentTagname: "span", |
---|
32 | footnoteParentClass: "spip_note_ref", |
---|
33 | footnoteTagname: "div" |
---|
34 | }); |
---|
35 | jQuery('div.notes').hide(); |
---|
36 | }; |
---|
37 | $(function(){ |
---|
38 | bigfoot_init(); |
---|
39 | onAjaxLoad(bigfoot_init); |
---|
40 | }); |
---|
41 | })(jQuery); |
---|
42 | /* ]]> */</script> |
---|
43 | |
---|
44 | EOH; |
---|
45 | return $flux; |
---|
46 | } |
---|
47 | |
---|
48 | /** |
---|
49 | * Insertion du script du plugin dans les pages de l'espace privé |
---|
50 | * @param $flux |
---|
51 | * @return mixed |
---|
52 | */ |
---|
53 | function bigfoot_header_prive($flux){ |
---|
54 | $flux .= bigfoot_insert_head_css(''); |
---|
55 | $flux .= bigfoot_insert_head(''); |
---|
56 | return $flux; |
---|
57 | } |
---|
58 | |
---|
59 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.